Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use KV store in nats registry #7987

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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