server

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config = server.Config

Config is a server config.

type Server

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

Server is a Weaveworks server with support for reloading.

func New

New creates a new Server. ApplyConfig must be called after creating a server.

func (*Server) ApplyConfig

func (s *Server) ApplyConfig(cfg Config, wire func(mux *mux.Router, grpc *grpc.Server)) error

ApplyConfig applies changes to the Server block. wire will be called when the server is recreated, and should be used to hook up endpoints.

If the SignalHandler is not set, it will default to not watching for signals. This contrasts the upstream default of watching for termination signals.

ApplyConfig will override the registerer of the Config to the registerer passed to New.

func (*Server) Close

func (s *Server) Close()

Close closes the Server.

func (*Server) Run

func (s *Server) Run() error

Run starts the Server. Run will block until an error occurs or until Close is called.

Jump to

Keyboard shortcuts

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