summaryrefslogtreecommitdiff
path: root/service/rpc/config.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-23 14:52:55 +0300
committerWolfy-J <[email protected]>2018-09-23 14:52:55 +0300
commit19d88fc879ba403347726138eb532fb85d38168e (patch)
treec93c9ddd7a6fe7be3b884458b3ad8e9f4c9b19ec /service/rpc/config.go
parentbd046974b969af381b3a50513d9f3ab453ed8bbf (diff)
default configs
Diffstat (limited to 'service/rpc/config.go')
-rw-r--r--service/rpc/config.go8
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 {