VOL-4925 - Build and release components.
Misc/
o Bulk copyright notice udpate to 2023.
go.mod
go.sum
------
o Bump component version strings to the latest release.
Cosmetic edit to force a build.
Change-Id: Icc8869463d1f1a4451938466c39fcc3d11ebad73
diff --git a/vendor/github.com/opencord/voltha-lib-go/v7/pkg/db/backend.go b/vendor/github.com/opencord/voltha-lib-go/v7/pkg/db/backend.go
index 2e57a27..31f100b 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v7/pkg/db/backend.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v7/pkg/db/backend.go
@@ -75,6 +75,10 @@
func (b *Backend) newClient(ctx context.Context, address string, timeout time.Duration) (kvstore.Client, error) {
switch b.StoreType {
+ case "redis":
+ return kvstore.NewRedisClient(address, timeout, false)
+ case "redis-sentinel":
+ return kvstore.NewRedisClient(address, timeout, true)
case "etcd":
return kvstore.NewEtcdClient(ctx, address, timeout, log.WarnLevel)
}
@@ -176,7 +180,7 @@
// List retrieves one or more items that match the specified key
func (b *Backend) List(ctx context.Context, key string) (map[string]*kvstore.KVPair, error) {
- span, ctx := log.CreateChildSpan(ctx, "etcd-list")
+ span, ctx := log.CreateChildSpan(ctx, "kvs-list")
defer span.Finish()
formattedPath := b.makePath(ctx, key)
@@ -191,7 +195,7 @@
// Get retrieves an item that matches the specified key
func (b *Backend) Get(ctx context.Context, key string) (*kvstore.KVPair, error) {
- span, ctx := log.CreateChildSpan(ctx, "etcd-get")
+ span, ctx := log.CreateChildSpan(ctx, "kvs-get")
defer span.Finish()
formattedPath := b.makePath(ctx, key)
@@ -206,7 +210,7 @@
// Put stores an item value under the specifed key
func (b *Backend) Put(ctx context.Context, key string, value interface{}) error {
- span, ctx := log.CreateChildSpan(ctx, "etcd-put")
+ span, ctx := log.CreateChildSpan(ctx, "kvs-put")
defer span.Finish()
formattedPath := b.makePath(ctx, key)
@@ -221,7 +225,7 @@
// Delete removes an item under the specified key
func (b *Backend) Delete(ctx context.Context, key string) error {
- span, ctx := log.CreateChildSpan(ctx, "etcd-delete")
+ span, ctx := log.CreateChildSpan(ctx, "kvs-delete")
defer span.Finish()
formattedPath := b.makePath(ctx, key)
@@ -234,9 +238,8 @@
return err
}
-// DeleteWithPrefix removes items having prefix key
func (b *Backend) DeleteWithPrefix(ctx context.Context, prefixKey string) error {
- span, ctx := log.CreateChildSpan(ctx, "etcd-delete-with-prefix")
+ span, ctx := log.CreateChildSpan(ctx, "kvs-delete-with-prefix")
defer span.Finish()
formattedPath := b.makePath(ctx, prefixKey)
@@ -251,7 +254,7 @@
// CreateWatch starts watching events for the specified key
func (b *Backend) CreateWatch(ctx context.Context, key string, withPrefix bool) chan *kvstore.Event {
- span, ctx := log.CreateChildSpan(ctx, "etcd-create-watch")
+ span, ctx := log.CreateChildSpan(ctx, "kvs-create-watch")
defer span.Finish()
formattedPath := b.makePath(ctx, key)
@@ -262,7 +265,7 @@
// DeleteWatch stops watching events for the specified key
func (b *Backend) DeleteWatch(ctx context.Context, key string, ch chan *kvstore.Event) {
- span, ctx := log.CreateChildSpan(ctx, "etcd-delete-watch")
+ span, ctx := log.CreateChildSpan(ctx, "kvs-delete-watch")
defer span.Finish()
formattedPath := b.makePath(ctx, key)