[VOL-2735]Durations should be specified as type time.Duration not int
Change-Id: Id1dbecc231b0708334723decbc943a57a60d8f1d
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index 06e5322..b44d372 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -33,7 +33,7 @@
defaultKafkaclusterhost = "127.0.0.1"
defaultKafkaclusterport = 9094
defaultKvstoretype = EtcdStoreName
- defaultKvstoretimeout = 5 //in seconds
+ defaultKvstoretimeout = 5 * time.Second //in seconds
defaultKvstorehost = "127.0.0.1"
defaultKvstoreport = 2379 // Consul = 8500; Etcd = 2379
defaultLoglevel = "WARN"
@@ -66,7 +66,7 @@
KafkaClusterHost string
KafkaClusterPort int
KVStoreType string
- KVStoreTimeout int // in seconds
+ KVStoreTimeout time.Duration // in seconds
KVStoreHost string
KVStorePort int
Topic string
@@ -145,7 +145,7 @@
flag.StringVar(&(so.KVStoreType), "kv_store_type", defaultKvstoretype, help)
help = fmt.Sprintf("The default timeout when making a kv store request")
- flag.IntVar(&(so.KVStoreTimeout), "kv_store_request_timeout", defaultKvstoretimeout, help)
+ flag.DurationVar(&(so.KVStoreTimeout), "kv_store_request_timeout", defaultKvstoretimeout, help)
help = fmt.Sprintf("KV store host")
flag.StringVar(&(so.KVStoreHost), "kv_store_host", defaultKvstorehost, help)