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 ¶func (s *Server) ListenAndServe() error
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.
func (*Server) Shutdown ¶func (s *Server) Shutdown(timeout time.Duration)
Shutdown terminates the server gracefully for the given timeout period and then returns.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4