mirror of
https://github.com/Octops/quake-kube.git
synced 2026-04-14 14:11:14 +00:00
Add prometheus instrumentation, count active ws conns (#8)
* Add prometheus instrumentation, count active ws conns * Stop bum ticker * Moving things around * Handle unspecified host for ws proxy * Add config reload counter * metrics: rename conns -> players
This commit is contained in:
@ -32,7 +32,16 @@ func (s *Server) Serve(l net.Listener) error {
|
||||
}
|
||||
}()
|
||||
|
||||
wsproxy, err := NewProxy(s.ServerAddr)
|
||||
host, port, err := net.SplitHostPort(s.ServerAddr)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
proxyTarget := s.ServerAddr
|
||||
if net.ParseIP(host).IsUnspecified() {
|
||||
// handle case where host is 0.0.0.0
|
||||
proxyTarget = net.JoinHostPort("127.0.0.1", port)
|
||||
}
|
||||
wsproxy, err := NewProxy(proxyTarget)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user