Documentation ¶
Overview ¶
Package config contains configuration parsing logic and provides metrics agent and server configuration objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct { PollInterval time.Duration `env:"POLL_INTERVAL" json:"poll_interval"` ReportInterval time.Duration `env:"REPORT_INTERVAL" json:"report_interval"` Address entity.NetAddress `env:"ADDRESS" json:"address"` Transport string `env:"TRANSPORT" json:"transport"` Secret security.Secret `env:"KEY" json:"key"` PublicKeyPath entity.FilePath `env:"CRYPTO_KEY" json:"crypto_key"` PollTimeout time.Duration `json:"-"` ExportTimeout time.Duration `json:"-"` Debug bool `env:"DEBUG" json:"debug"` }
func (*Agent) UnmarshalJSON ¶
type Server ¶
type Server struct { Address entity.NetAddress `env:"ADDRESS" json:"address"` GRPCAddress entity.NetAddress `env:"GRPC_ADDRESS" json:"grpc_address"` StoreInterval time.Duration `env:"STORE_INTERVAL" json:"store_interval"` StorePath string `env:"STORE_FILE" json:"store_file"` RestoreOnStart bool `env:"RESTORE" json:"restore"` Secret security.Secret `env:"KEY" json:"key"` PrivateKeyPath entity.FilePath `env:"CRYPTO_KEY" json:"crypto_key"` TrustedSubnet *net.IPNet `env:"TRUSTED_SUBNET" json:"trusted_subnet"` DatabaseURL security.DatabaseURL `env:"DATABASE_DSN" json:"database_dsn"` PprofAddress entity.NetAddress `env:"PPROF_ADDRESS" json:"pprof_address"` Debug bool `env:"DEBUG" json:"debug"` }
func (*Server) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.