Versions in this module Expand all Collapse all v0 v0.0.2 Nov 2, 2022 v0.0.1 Nov 2, 2022 Changes in this version + func NewDefaultServer(config *Config, handler http.Handler) *http.Server + type ApplyFunc func(s *http.Server) + func SetAddr(addr string) ApplyFunc + func SetBaseContext(ctx context.Context) ApplyFunc + func SetLogger(logger *log.Logger) ApplyFunc + func SetTimeOuts(config *Config) ApplyFunc + func (a ApplyFunc) Apply(s *http.Server) + type Builder struct + func NewBuilder() *Builder + func (b *Builder) Build(ctx context.Context) *Server + func (b *Builder) WithConfig(config *Config) *Builder + func (b *Builder) WithContext(ctx context.Context, cancel context.CancelFunc) *Builder + func (b *Builder) WithCustomServer(server *http.Server) *Builder + func (b *Builder) WithHandler(handler http.Handler) *Builder + func (b *Builder) WithOptions(options ...Option) *Builder + type Config struct + Addr string + HealthCheckEndpoint string + IdleTimeout time.Duration + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + WriteTimeout time.Duration + func NewDefaultConfig() *Config + type Option interface + Apply func(s *http.Server) + type Options []Option + func (o Options) Apply(s *http.Server) + type Server struct + func NewServer(server *http.Server, ctx context.Context, cancel context.CancelFunc) *Server + func (s *Server) Start(waitFuncs ...WGFunc) + func (s *Server) StartAndWait(waitFuncs ...WGFunc) error + func (s *Server) Wait() error + func (s *Server) WatchContext() WGFunc + func (s *Server) WatchSignal(signals ...os.Signal) WGFunc + type WGFunc func() error