[VOL-2736]:host and port should be specified as a single argument not as two separate arguments
Change-Id: I14b59b4e42b1cf0821807cdb3dd6eef2094077da
diff --git a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go
index 20bacad..1e23a0f 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v3/pkg/db/backend.go
@@ -20,7 +20,6 @@
"context"
"errors"
"fmt"
- "strconv"
"time"
"github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
@@ -38,9 +37,8 @@
type Backend struct {
Client kvstore.Client
StoreType string
- Host string
- Port int
Timeout time.Duration
+ Address string
PathPrefix string
alive bool // Is this backend connection alive?
liveness chan bool // channel to post alive state
@@ -49,24 +47,22 @@
}
// NewBackend creates a new instance of a Backend structure
-func NewBackend(storeType string, host string, port int, timeout time.Duration, pathPrefix string) *Backend {
+func NewBackend(storeType string, address string, timeout time.Duration, pathPrefix string) *Backend {
var err error
b := &Backend{
StoreType: storeType,
- Host: host,
- Port: port,
+ Address: address,
Timeout: timeout,
LivenessChannelInterval: DefaultLivenessChannelInterval,
PathPrefix: pathPrefix,
alive: false, // connection considered down at start
}
- address := host + ":" + strconv.Itoa(port)
if b.Client, err = b.newClient(address, timeout); err != nil {
logger.Errorw("failed-to-create-kv-client",
log.Fields{
- "type": storeType, "host": host, "port": port,
+ "type": storeType, "address": address,
"timeout": timeout, "prefix": pathPrefix,
"error": err.Error(),
})