Skip to content

Commit

Permalink
use kv store in natsjs registry (#7987)
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
kobergj committed Dec 18, 2023
1 parent 2f5742a commit c1af7dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/kv-nats-registry.md
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions ocis-pkg/natsjsregistry/registry.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -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"
Expand All @@ -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,
}
Expand Down

0 comments on commit c1af7dd

Please sign in to comment.