Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addresses ¶
type Addresses struct {
HTTP string
}
Addresses encapsulates all of the addresses we bind to for various network services. Everything is optional and defaults to BindAddr.
type Config ¶
type Config struct { // Region is the region this server is supposed to deal in. // Defaults to global. Region string // LogLevel is the level of the logs to putout LogLevel string // BindAddr is the address on which server services will // be bound. If not specified, this defaults to 127.0.0.1. BindAddr string // Port is used to control the network ports we bind to. Port *int // Addresses is used to override the network addresses we bind to. // // Use normalizedAddrs if you need the host+port to bind to. Addresses *Addresses // NormalizedAddr is set to the Address+Port by normalizeAddrs() NormalizedAddrs *Addresses // LeaveOnTerm is used to gracefully leave on the terminate signal LeaveOnTerm bool // HTTPAPIResponseHeaders allows users to configure the http agent to // set arbitrary headers on API responses HTTPAPIResponseHeaders map[string]string }
Config is the configuration for server.
func DefaultServerConfig ¶
func DefaultServerConfig() *Config
DefaultServerConfig is a the baseline configuration for server
func (*Config) Listener ¶
Listener can be used to get a new listener using a custom bind address. If the bind provided address is empty, the BindAddr is used instead.
func (*Config) NormalizeAddrs ¶
NormalizeAddrs normalizes Addresses to always be initialized and have sane defaults.
Click to show internal directories.
Click to hide internal directories.