httpsrv

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.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 Server

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

func New

func New(addr string, opts ...ServerOpt) (*Server, error)

func (*Server) Serve

func (srv *Server) Serve() error

func (*Server) Shutdown

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

type ServerOpt

type ServerOpt func(*Server)

func WithCert

func WithCert(cert *tls.Certificate) ServerOpt

func WithCheckLogger

func WithCheckLogger(checkLogger *observe.CheckLogger) ServerOpt

func WithChecker

func WithChecker(checker *policy.Checker) ServerOpt

func WithLogger

func WithLogger(logger *slog.Logger) ServerOpt

func WithMetrics

func WithMetrics(metrics observe.Metrics) ServerOpt

Jump to

Keyboard shortcuts

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