chore: change the defaults
This commit is contained in:
parent
27edc01912
commit
8f48ab6491
2 changed files with 6 additions and 6 deletions
|
|
@ -40,7 +40,7 @@ func FromFile(filename string) (Config, error) {
|
||||||
return Config{}, fmt.Errorf("parse config file: %w", err)
|
return Config{}, fmt.Errorf("parse config file: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
config := defaultConfig
|
config := DefaultConfig
|
||||||
config.Node.Merge(temp.Node)
|
config.Node.Merge(temp.Node)
|
||||||
|
|
||||||
if c := temp.Configs.Master; c != nil {
|
if c := temp.Configs.Master; c != nil {
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
package config
|
package config
|
||||||
|
|
||||||
var defaultConfig = Config{
|
var DefaultConfig = Config{
|
||||||
Node: NodeConfig{
|
Node: NodeConfig{
|
||||||
ListenOn: "0.0.0.0",
|
ListenOn: "0.0.0.0",
|
||||||
Port: 56714,
|
Port: 56714,
|
||||||
KeepaliveInterval: 1,
|
KeepaliveInterval: 10,
|
||||||
LogLevel: LogLevelInfo,
|
LogLevel: LogLevelInfo,
|
||||||
},
|
},
|
||||||
Configs: Configs{
|
Configs: Configs{
|
||||||
Master: MasterConfig{
|
Master: MasterConfig{
|
||||||
ObserverInterval: 10,
|
ObserverInterval: 120,
|
||||||
BackoffSeconds: 2,
|
BackoffSeconds: 1,
|
||||||
BackoffCount: 3,
|
BackoffCount: 4,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue