Versions in this module Expand all Collapse all v0 v0.5.3 Mar 11, 2024 v0.5.2 Mar 9, 2024 Changes in this version + var DefaultLoggerDevelopment = slog.New(tint.NewHandler(os.Stdout, &tint.Options{ ... })) + var DefaultLoggerProduction = slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{ ... })) + func T() + type Mode string + const ModeDevelopment + const ModeProduction + type Option func(*Server) + func DevelopmentMode() Option + func ListenOn(listen string) Option + func ProductionMode() Option + func WithLogger(logger *slog.Logger) Option + func WithMode(mode Mode) Option + func WithServerTimeouts(readTimeout, writeTimeout, idleTimeout time.Duration) Option + func WithShutdownTimeout(timeout time.Duration) Option + type Server struct + HTTPServer *http.Server + func New(handler http.Handler, options ...Option) *Server + func (s *Server) AddShutdownHook(hook func(context.Context) error) + func (s *Server) Context() context.Context + func (s *Server) Run() error