Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminConfig ¶
type AdminConfig struct {
Prefix string `json:"prefix" usage:"configure the prefix to use for admin endpoints" default:"/_admin" hidden:"true"`
Username string `json:"username" usage:"specify the username used to authenticate requests with the admin endpoints" default:"admin"`
Password string `json:"password" usage:"specify the password used to authenticate requests with the admin endpoints"`
}
AdminConfig encapsulates configuration for the administrative endpoints.
type BindConfig ¶
type BindConfig struct {
Address string `json:"address" usage:"configure the bind address for the server"`
}
BindConfig defines the set of configuration options for setting up a server.
type Server ¶
type Server struct {
AdminMux *mux.Router
PublicMux *mux.Router
Public *http.Server
PrivateMux *mux.Router
Private *http.Server
}
Server hosts a Public and Private HTTP server.
func NewServer ¶
func NewServer(ctx context.Context, config ServerConfig) (*Server, error)
NewServer constructs a Server from it's associated configuration.
func (*Server) ListenAndServe ¶
ListenAndServe starts underlying Public and Private HTTP servers.
type ServerConfig ¶
type ServerConfig struct {
Admin AdminConfig `json:"admin"`
GeoIP geoip.Config `json:"geoip"`
Session session.Config `json:"session"`
TLS livetls.Config `json:"tls"`
Public BindConfig `json:"public"`
Private BindConfig `json:"private"`
}
ServerConfig defines configuration for a public and private interface.
Click to show internal directories.
Click to hide internal directories.