server

package
v0.0.0-...-450f66f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultAdminServer

func DefaultAdminServer(kubernetesClient internal.ControlPlaneClient) *http.Server

Types

type Server

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

func NewServer

func NewServer(options ...ServerOption) *Server

func (*Server) RegisterRoutes

func (s *Server) RegisterRoutes(r *chi.Mux)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

type ServerOption

type ServerOption func(s *Server)

ServerOption lets you functionally control construction of the web server

func WithAdminServer

func WithAdminServer(adminServer *http.Server) ServerOption

func WithKubernetesClient

func WithKubernetesClient(clientset internal.ControlPlaneClient) ServerOption

func WithLogger

func WithLogger(log zerolog.Logger) ServerOption

func WithMetrics

func WithMetrics(metrics internal.MetricsClient) ServerOption

Jump to

Keyboard shortcuts

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