Documentation ¶
Index ¶
Constants ¶
View Source
const ConfigSchema = `` /* 3217-byte string literal not displayed */
Generated at http://jsonschema.net/#/
View Source
const DEFAULT_FILENAME = "config.json"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackendConfig ¶
type BackendConfig struct { Name string `json:"name"` Address string `json:"address"` Heartbeat string `json:"heartbeat"` HBMethod string `json:"hbmethod"` ActiveAfter int `json:"activeAfter"` InactiveAfter int `json:"inactiveAfter"` // Consider inactive after max inactiveAfter Weight int `json:"weigth"` HeartbeatTime time.Duration `json:"heartbeatTime"` // Heartbeat time if health RetryTime time.Duration `json:"retryTime"` // Retry to time after failed }
BackendConfig it's the configuration loaded
type BackendsConfig ¶
type BackendsConfig []BackendConfig
type Configuration ¶
type Configuration struct { GeneralConfig `json:"general"` FrontendsConfig `json:"frontends"` }
func Setup ¶
func Setup(filename string) Configuration
Setup will build everything and let the server run
type FrontendConfig ¶
type FrontendsConfig ¶
type FrontendsConfig []FrontendConfig
type GeneralConfig ¶
type GeneralConfig struct { MaxProcs int `json:"maxProcs"` WorkerPoolSize int `json:"workerPoolSize"` GracefulShutdown bool `json:"gracefulShutdown"` Websocket bool `json:"websocket"` LogLevel string `json:"logLevel"` // Need to define how it works RPCHost string `json:"rpchost"` RPCPort int `json:"rpcport"` APIHost string `json:"apihost"` APIPort int `json:"apiport"` }
func (GeneralConfig) APIAddres ¶
func (c GeneralConfig) APIAddres() string
func (GeneralConfig) RPCAddres ¶
func (c GeneralConfig) RPCAddres() string
Click to show internal directories.
Click to hide internal directories.