diff options
Diffstat (limited to 'service/rpc/config.go')
-rw-r--r-- | service/rpc/config.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/service/rpc/config.go b/service/rpc/config.go index 93fce7ca..653da6ea 100644 --- a/service/rpc/config.go +++ b/service/rpc/config.go @@ -26,6 +26,14 @@ func (c *Config) Hydrate(cfg service.Config) error { return c.Valid() } +// InitDefaults allows to init blank config with pre-defined set of default values. +func (c *Config) InitDefaults() error { + c.Enable = true + c.Listen = "tcp://127.0.0.1:6001" + + return nil +} + // Valid returns nil if config is valid. func (c *Config) Valid() error { if dsn := strings.Split(c.Listen, "://"); len(dsn) != 2 { |