Documentation ¶
Index ¶
- type Config
- func (c *Config) GetLoggerContextExtraFields() []string
- func (c *Config) GetLoggerFormatter() string
- func (c *Config) GetLoggerLevel() string
- func (c *Config) GetLoggerOutput() string
- func (c *Config) GetMongoDatabase() string
- func (c *Config) GetMongoHost() string
- func (c *Config) GetMongoLogin() string
- func (c *Config) GetMongoPassword() string
- func (c *Config) GetMongoPort() int
- func (c *Config) GetServerName() string
- func (c *Config) GetServerPort() string
- func (c *Config) GetServerRequestTimeout() time.Duration
- func (c *Config) GetServerShutDownTimeout() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // LoggerLevel: info, debug, warning, error, fatal, panic. LoggerLevel string `envconfig:"LOGGER_LEVEL" default:"debug"` // LoggerLevel: /dev/null/, stdout, stderr, or filename (logs will store in the {projectRoot}/var/log dir.). LoggerOutput string `envconfig:"LOGGER_OUTPUT" default:"stdout"` // LoggerFormatter: text, json. LoggerFormatter string `envconfig:"LOGGER_FORMAT" default:"json"` // LoggerContextExtraFields determines which fields must be extract from // context.Context and passed into log record (see more into ctxenum package). LoggerContextExtraFields []string `envconfig:"LOGGER_CONTEXT_EXTRA_FIELD" default:"jobId,taskId"` // MongoHost is a host from docker-compose (mongodb container name). MongoHost string `envconfig:"MONGO_HOST" default:"mongodb"` // MongoPort is an exposed port of mongodb. MongoPort int `envconfig:"MONGO_PORT" default:"27017"` // MongoLogin is a login for simple auth. MongoLogin string `envconfig:"MONGO_LOGIN" default:"spider"` // MongoPassword is a password for simple auth. MongoPassword string `envconfig:"MONGO_PASSWORD" default:"spider"` // MongoDatabase is a name of target mongodb. MongoDatabase string `envconfig:"MONGO_DATABASE" default:"spider"` // MongoRequestTimeout is a timeout per request to mongodb. MongoRequestTimeout time.Duration `envconfig:"MONGO_REQUEST_TIMEOUT" default:"5s"` // InfrastructureServerName is a name of the shared server. InfrastructureServerName string `envconfig:"INFRASTRUCTURE_SERVER_NAME" default:"infrastructure"` // InfrastructureServerPort is a port for shared server (endpoints like a /probe for k8s). InfrastructureServerPort string `envconfig:"INFRASTRUCTURE_SERVER_PORT" default:":8000"` // InfrastructureServerShutDownTimeout is a duration value before the server will be closed forcefully. InfrastructureServerShutDownTimeout time.Duration `envconfig:"INFRASTRUCTURE_SERVER_SHUTDOWN_TIMEOUT" default:"5s"` // InfrastructureServerRequestTimeout is a timeout value for close request forcefully. InfrastructureServerRequestTimeout time.Duration `envconfig:"INFRASTRUCTURE_SERVER_REQUEST_TIMEOUT" default:"1m"` }
func (*Config) GetLoggerContextExtraFields ¶
func (*Config) GetLoggerFormatter ¶
func (*Config) GetLoggerLevel ¶
func (*Config) GetLoggerOutput ¶
func (*Config) GetMongoDatabase ¶
func (*Config) GetMongoHost ¶
func (*Config) GetMongoLogin ¶
func (*Config) GetMongoPassword ¶
func (*Config) GetMongoPort ¶
func (*Config) GetServerName ¶
func (*Config) GetServerPort ¶
func (*Config) GetServerRequestTimeout ¶
func (*Config) GetServerShutDownTimeout ¶
Click to show internal directories.
Click to hide internal directories.