brutella / hc

hc is a lightweight framework to develop HomeKit accessories in Go.
Apache License 2.0
1.74k stars 189 forks source link

Expose `http.ServeMux` to allow applications to add additional endpoints #212

Closed benpye closed 2 years ago

benpye commented 2 years ago

It would be useful to expose the http.ServeMux so an application could add an additional listener without needing to listen on a new port. In my case I want to expose a Prometheus metric endpoint, currently I need to listen on an additional point but I don't think there is any reason this should be necessary.

brutella commented 2 years ago

I've refactored hc and made a new library out of it. The new library is available as hap. The new hap server gives you access to the ServeMux.