[VOL-2735]Durations in voltha-lib-go should be specified as type time.Duration not int
Change-Id: I782e44fe1dc041b9eb54fd837950d2176e18fe42
diff --git a/pkg/db/backend.go b/pkg/db/backend.go
index 4d29195..20bacad 100644
--- a/pkg/db/backend.go
+++ b/pkg/db/backend.go
@@ -40,7 +40,7 @@
StoreType string
Host string
Port int
- Timeout int
+ Timeout time.Duration
PathPrefix string
alive bool // Is this backend connection alive?
liveness chan bool // channel to post alive state
@@ -49,7 +49,7 @@
}
// NewBackend creates a new instance of a Backend structure
-func NewBackend(storeType string, host string, port int, timeout int, pathPrefix string) *Backend {
+func NewBackend(storeType string, host string, port int, timeout time.Duration, pathPrefix string) *Backend {
var err error
b := &Backend{
@@ -75,7 +75,7 @@
return b
}
-func (b *Backend) newClient(address string, timeout int) (kvstore.Client, error) {
+func (b *Backend) newClient(address string, timeout time.Duration) (kvstore.Client, error) {
switch b.StoreType {
case "consul":
return kvstore.NewConsulClient(address, timeout)