mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-10-23 14:49:22 -04:00
use kv store in natsjs registry (#7987)
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
1 parent
2f5742aa80
commit
c1af7dd5ce
2 files changed
+8
-3
No files matched your search
@@ -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
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user