Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerConfig ¶
type ServerConfig struct { // IsGrpc on true, use grpc and don't use HTTP // Restore on true, loads db from file on start // StoreInterval interval in seconds of saving metrics to disk. use 0 to write immediately // FileStorage absolute path to json file for db to be saved into. on omission, don't write // PayloadSignatureKey used to check authenticity and to sign response hashes // TrustedSubnet is a single ip subnet that allowed to make requests in CIDR format IsGrpc bool Restore bool StoreInterval int Addr string DBDsn string FileStorage string PayloadSignatureKey string PrivateKeyFilePath string TrustedSubnet *net.IPNet }
ServerConfig is used to tune server behaviour
func New ¶
func New() *ServerConfig
New gets config from these places, each overwriting the previous one - config file (path taken from CONFIG env var or -config flag) - cli flags - env vars
Click to show internal directories.
Click to hide internal directories.