server

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithListener

func WithListener(ln net.Listener) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithPromRegistry

func WithPromRegistry(promRegistry *prometheus.Registry) Option

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server exposes endpoints for nodes to register themselves and inspect the registry.

func NewServer

func NewServer(addr string, cluster *cluster.Cluster, opts ...Option) *Server

func (*Server) GracefulStop

func (s *Server) GracefulStop()

GracefulStop closes the server and gracefully sheds connections. TODO(AD) Doesn't yet handle gracefully closing websocket connections.

func (*Server) Start

func (s *Server) Start() error

Start starts the server on the given listener.

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL