fix name of nats-js-kv registry

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2024-01-05 14:22:33 +01:00
parent c46db2b7cb
commit 1110bf2178
4 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -1950,7 +1950,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"FRONTEND_SEARCH_MIN_LENGTH": "2",
"OCIS_ASYNC_UPLOADS": True,
"OCIS_EVENTS_ENABLE_TLS": False,
"MICRO_REGISTRY": "natsjs",
"MICRO_REGISTRY": "nats-js-kv",
"MICRO_REGISTRY_ADDRESS": "127.0.0.1:9233",
}
@@ -0,0 +1,5 @@
Bugfix: Fix wrong naming in nats-js-kv registry
Registers the registry under the correct name
https://github.com/owncloud/ocis/pull/8140
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"go-micro.dev/v4/util/cmd"
)
var _registryName = "natsjs"
var _registryName = "nats-js-kv"
func init() {
cmd.DefaultRegistries[_registryName] = NewRegistry
+5 -4
View File
@@ -66,13 +66,14 @@ func GetRegistry(opts ...Option) mRegistry.Registry {
mRegistry.Addrs(cfg.Addresses...),
natsjsregistry.Authenticate(cfg.Username, cfg.Password),
)
case "kubernetes":
_reg = kubernetesr.NewRegistry(
mRegistry.Addrs(cfg.Addresses...),
)
case "memory":
_reg = memr.NewRegistry()
cfg.DisableCache = true // no cache needed for in-memory registry
case "kubernetes":
fmt.Println("Attention: kubernetes registry is deprecated, use nats-js-kv instead")
_reg = kubernetesr.NewRegistry(
mRegistry.Addrs(cfg.Addresses...),
)
case "nats":
fmt.Println("Attention: nats registry is deprecated, use nats-js-kv instead")
_reg = natsr.NewRegistry(