Documentation ¶
Overview ¶
Package statserver provides a WebSocket server which receives autoscaler statistics, typically from queue proxy sidecar containers, and sends them to a channel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server receives autoscaler statistics over WebSocket and sends them to a channel.
func New ¶
func New(statsServerAddr string, statsCh chan<- metrics.StatMessage, logger *zap.SugaredLogger) *Server
New creates a Server which will receive autoscaler statistics and forward them to statsCh until Shutdown is called.
func (*Server) Handler ¶
func (s *Server) Handler(w http.ResponseWriter, r *http.Request)
Handler exposes a websocket handler for receiving stats from queue sidecar containers.
func (*Server) ListenAndServe ¶
ListenAndServe listens on the address s.addr and handles incoming connections. It blocks until the server fails or Shutdown is called. It returns an error or, if Shutdown was called, nil.