use kv store in natsjs registry (#7987)

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
kobergj
2023-12-18 10:17:48 +01:00
committed by GitHub
parent 2f5742aa80
commit c1af7dd5ce
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
Enhancement: Use kv store in natsjs registry
Replaces the nats object store with the nats kv store in the natsjs registry
https://github.com/owncloud/ocis/pull/7987
+3 -3
View File
@@ -1,4 +1,4 @@
// Package natsjsregistry implements a registry using natsjs object store
// Package natsjsregistry implements a registry using natsjs kv store
package natsjsregistry
import (
@@ -7,7 +7,7 @@ import (
"errors"
"time"
natsjs "github.com/go-micro/plugins/v4/store/nats-js"
natsjskv "github.com/go-micro/plugins/v4/store/nats-js-kv"
"go-micro.dev/v4/registry"
"go-micro.dev/v4/store"
"go-micro.dev/v4/util/cmd"
@@ -30,7 +30,7 @@ func NewRegistry(opts ...registry.Option) registry.Registry {
exp, _ := options.Context.Value(expiryKey{}).(time.Duration)
return &storeregistry{
opts: options,
store: natsjs.NewStore(storeOptions(options)...),
store: natsjskv.NewStore(storeOptions(options)...),
typ: _registryName,
expiry: exp,
}