stdserver

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultHandler

type DefaultHandler struct{}

func (*DefaultHandler) ServeHTTP

func (h *DefaultHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

DefaultHandler.ServeHTTP is the default handler.

type HealthzHandler

type HealthzHandler struct {
}

func (*HealthzHandler) ServeHTTP

func (h *HealthzHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

HealthzHandler.ServeHTTP is the default healthz handler.

type Server

type Server struct {
	// ctx     context.Context
	Address string

	Debug bool
	// contains filtered or unexported fields
}

func New

func New() *Server

func (*Server) Run

func (s *Server) Run(handler, healthzHandler, debugHandler http.Handler) error

Server.Run() starts the server

func (*Server) Shutdown

func (s *Server) Shutdown() error

func (*Server) ShutdownOnInterrupt

func (s *Server) ShutdownOnInterrupt(wg *sync.WaitGroup)

type ServerStats

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

Jump to

Keyboard shortcuts

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