Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // File specifies a file from which to read the config // If empty, config will be read from the environment File string )
Functions ¶
func IsMissingConfig ¶
IsMissingConfig returns true if the the error has to do with missing required configs
Types ¶
type Config ¶
type Config struct { Debug bool `envconfig:"debug" json:"debug"` DisableWebsocket bool `envconfig:"noweb" json:"noweb"` DisableTCP bool `envconfig:"notcp" default:"true" json:"notcp"` WebsocketPort int `envconfig:"wsport" default:"8080" json:"wsport"` StratumPort int `envconfig:"strport" default:"1111" json:"strport"` SecureWebsocket bool `envconfig:"wss" json:"wss"` CertFile string `envconfig:"tlscert" json:"tlscert"` KeyFile string `envconfig:"tlskey" json:"tlskey"` // TODO multiple pools for fallback PoolAddr string `envconfig:"url" required:"true" json:"url"` PoolLogin string `envconfig:"login" required:"true" json:"login"` PoolPassword string `envconfig:"password" required:"true" json:"password"` StatInterval int `envconfig:"stats" default:"60" json:"stats"` DonateLevel int `envconfig:"donate" default:"2" json:"donate"` // LogFile and DiscardLog are mutually exclusive - logfile will be used if present LogFile string `envconfig:"log" json:"log"` DiscardLog bool `envconfig:"nolog" json:"nolog"` // not yet implemented Background bool `envconfig:"background" json:"background"` }
Config holds the global application configuration.
Click to show internal directories.
Click to hide internal directories.