diff options
author | Valery Piashchynski <[email protected]> | 2021-09-16 21:46:50 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-09-16 21:46:50 +0300 |
commit | 3581b45f237a3f7aa29591ceb2bf6f4a4642a2f5 (patch) | |
tree | e723b19ec1ac16b7ccc7b3c2da69d4a416d63d81 /plugins/server/config.go | |
parent | 337d292dd2d6ff0a555098b1970d8194d8df8bc2 (diff) | |
parent | 823d831b57b75f70c7c3bbbee355f2016633bb3b (diff) |
[#803]: feat(plugins): move plugins to a separate repositoryv2.5.0-alpha.2
[#803]: feat(plugins): move plugins to a separate repository
Diffstat (limited to 'plugins/server/config.go')
-rw-r--r-- | plugins/server/config.go | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/plugins/server/config.go b/plugins/server/config.go deleted file mode 100644 index 00ce4140..00000000 --- a/plugins/server/config.go +++ /dev/null @@ -1,60 +0,0 @@ -package server - -import ( - "time" -) - -// Config All config (.rr.yaml) -// For other section use pointer to distinguish between `empty` and `not present` -type Config struct { - // Server config section - Server struct { - // Command to run as application. - Command string `mapstructure:"command"` - // User to run application under. - User string `mapstructure:"user"` - // Group to run application under. - Group string `mapstructure:"group"` - // Env represents application environment. - Env Env `mapstructure:"env"` - // Relay defines connection method and factory to be used to connect to workers: - // "pipes", "tcp://:6001", "unix://rr.sock" - // This config section must not change on re-configuration. - Relay string `mapstructure:"relay"` - // RelayTimeout defines for how long socket factory will be waiting for worker connection. This config section - // must not change on re-configuration. Defaults to 60s. - RelayTimeout time.Duration `mapstructure:"relay_timeout"` - } `mapstructure:"server"` - - // we just need to know if the section exist, we don't need to read config from it - RPC *struct { - Listen string `mapstructure:"listen"` - } `mapstructure:"rpc"` - Logs *struct { - } `mapstructure:"logs"` - HTTP *struct { - } `mapstructure:"http"` - Redis *struct { - } `mapstructure:"redis"` - Boltdb *struct { - } `mapstructure:"boltdb"` - Memcached *struct { - } `mapstructure:"memcached"` - Memory *struct { - } `mapstructure:"memory"` - Metrics *struct { - } `mapstructure:"metrics"` - Reload *struct { - } `mapstructure:"reload"` -} - -// InitDefaults for the server config -func (cfg *Config) InitDefaults() { - if cfg.Server.Relay == "" { - cfg.Server.Relay = "pipes" - } - - if cfg.Server.RelayTimeout == 0 { - cfg.Server.RelayTimeout = time.Second * 60 - } -} |