Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerConfig ¶
type FileServerConfig ¶
type FileServerConfig struct { Server string `envconfig:"FILE_SERVER_URL" default:"localhost:22"` User string `envconfig:"FILE_SERVER_USER" default:"admin"` Password string `envconfig:"FILE_SERVER_PASSWORD" default:"secret"` PrivateKey string `envconfig:"FILE_SERVER_PRIVATE_KEY"` KeyExchanges string `envconfig:"FILE_SERVER_KEY_EXCHANGES"` }
type LoggerConfig ¶
type LoggerConfig struct { ConsoleEnabled bool `envconfig:"LOG_CONSOLE_ENABLED" default:"true"` ConsoleLevel string `envconfig:"LOG_CONSOLE_LEVEL" default:"debug"` ConsoleJSON bool `envconfig:"LOG_CONSOLE_JSON" default:"false"` FileEnabled bool `envconfig:"LOG_FILE_ENABLED" default:"false"` FileLevel string `envconfig:"LOG_FILE_LEVEL" default:"info"` FileJSON bool `envconfig:"LOG_FILE_JSON" default:"true"` // Directory to log to to when filelogging is enabled Directory string `envconfig:"LOG_FILE_DIR" default:"./logs"` // Filename is the name of the logfile which will be placed inside the directory Filename string `envconfig:"LOG_FILE_NAME" default:"collector.log"` // MaxSize the max size in MB of the logfile before it's rolled MaxSize int `envconfig:"LOG_MAX_SIZE"` // MaxBackups the max number of rolled files to keep MaxBackups int `envconfig:"LOG_MAX_BACKUPS" default:"7"` // MaxAge the max age in days to keep a logfile MaxAge int `enconfig:"LOG_MAX_AGE" default:"1"` }
type Settings ¶
type Settings struct { ServiceName string `envconfig:"SERVICE_NAME" default:"go-collector"` ServiceVersion string `envconfig:"SERVICE_VERSION" default:"0.0.0"` Env string `envconfig:"ENVIRONMENT" default:"dev"` Debug bool `envconfig:"DEBUG" default:"false"` AwsRegion string `envconfig:"AWS_REGION" default:"sa-east-1"` TraceServiceName string `envconfig:"TRACE_SERVICE_NAME"` TraceURL string `envconfig:"TRACE_URL" default:"http://localhost:14268"` TraceEnabled bool `envconfig:"TRACE_ENABLED" defult:"false"` BrokerConfig BrokerConfig StorageConfig StorageConfig FileServerConfig FileServerConfig LoggerConfig LoggerConfig }
func (*Settings) LoadFromEnv ¶
Click to show internal directories.
Click to hide internal directories.