Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Router *mux.Router
Address string
Environment *env.Environment
// contains filtered or unexported fields
}
App holds entities that can be used to control the web server
func (*App) InstallRoutes ¶
func (a *App) InstallRoutes(f RouteInstaller)
func (*App) ServeUntilShutdown ¶
func (a *App) ServeUntilShutdown()
ServeUntilShutdown blocks until a shutdown signal is received, then shuts down the HTTP server.
type Option ¶
type Option func(*Options)
func AllowOrigin ¶
func Environment ¶
func Environment(e env.Environment) Option
type Options ¶
type Options struct {
Environment env.Environment
Headers map[string]string
StopWait time.Duration
WriteTimeout time.Duration
IdleTimeout time.Duration
ReadHeaderTimeout time.Duration
Logger *logrus.Logger
}
Options holds basic web service settings.
type RouteInstaller ¶
type RouteInstaller func(*mux.Router, *env.Environment)
Click to show internal directories.
Click to hide internal directories.