Documentation
¶
Index ¶
- type App
- type Middleware
- type Option
- func WithAddress(address string) Option
- func WithCORS(enabled bool) Option
- func WithDebug(debug bool) Option
- func WithLogger(logger *zap.Logger) Option
- func WithMiddleware(middleware Middleware) Option
- func WithPathPrefix(prefix string) Option
- func WithPort(port int) Option
- func WithShutdownTimeout(timeout time.Duration) Option
- func WithStartupTimeout(timeout time.Duration) Option
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface { http.Handler // Startup controls app startup Startup(ctx context.Context) error // Shutdown controls app shutdown Shutdown(ctx context.Context) error }
App is a http.Handler with Startup and Shutdown lifecycle
type Option ¶
type Option func(s *Server)
func WithAddress ¶
func WithLogger ¶
func WithMiddleware ¶
func WithMiddleware(middleware Middleware) Option
func WithPathPrefix ¶
func WithShutdownTimeout ¶ added in v0.1.5
func WithStartupTimeout ¶ added in v0.1.5
Click to show internal directories.
Click to hide internal directories.