feat(ocis): remove deprecated registries
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -8,12 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
rRegistry "github.com/cs3org/reva/v2/pkg/registry"
|
||||
consulr "github.com/go-micro/plugins/v4/registry/consul"
|
||||
etcdr "github.com/go-micro/plugins/v4/registry/etcd"
|
||||
kubernetesr "github.com/go-micro/plugins/v4/registry/kubernetes"
|
||||
mdnsr "github.com/go-micro/plugins/v4/registry/mdns"
|
||||
memr "github.com/go-micro/plugins/v4/registry/memory"
|
||||
natsr "github.com/go-micro/plugins/v4/registry/nats"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/natsjsregistry"
|
||||
mRegistry "go-micro.dev/v4/registry"
|
||||
"go-micro.dev/v4/registry/cache"
|
||||
@@ -68,28 +63,6 @@ func GetRegistry(opts ...Option) mRegistry.Registry {
|
||||
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()
|
||||
case "nats":
|
||||
fmt.Println("Attention: nats registry is deprecated, use nats-js-kv instead")
|
||||
_reg = natsr.NewRegistry(
|
||||
mRegistry.Addrs(cfg.Addresses...),
|
||||
natsr.RegisterAction("put"),
|
||||
)
|
||||
case "etcd":
|
||||
fmt.Println("Attention: etcd registry is deprecated, use nats-js-kv instead")
|
||||
_reg = etcdr.NewRegistry(
|
||||
mRegistry.Addrs(cfg.Addresses...),
|
||||
)
|
||||
case "consul":
|
||||
fmt.Println("Attention: consul registry is deprecated, use nats-js-kv instead")
|
||||
_reg = consulr.NewRegistry(
|
||||
mRegistry.Addrs(cfg.Addresses...),
|
||||
)
|
||||
case "mdns":
|
||||
fmt.Println("Attention: mdns registry is deprecated, use nats-js-kv instead")
|
||||
_reg = mdnsr.NewRegistry()
|
||||
}
|
||||
|
||||
// Disable cache if wanted
|
||||
|
||||
+1
-5
@@ -9,13 +9,9 @@ This package also configures the service registry which will be used to look up
|
||||
Available registries are:
|
||||
|
||||
- nats-js-kv (default)
|
||||
- kubernetes
|
||||
- memory
|
||||
- etcd (deprecated)
|
||||
- consul (deprecated)
|
||||
- mdns (deprecated)
|
||||
|
||||
To configure which registry to use, you have to set the environment variable `MICRO_REGISTRY`, and for all except `memory` and `mdns` you also have to set the registry address via `MICRO_REGISTRY_ADDRESS`.
|
||||
To configure which registry to use, you have to set the environment variable `MICRO_REGISTRY`, and for all except `memory` you also have to set the registry address via `MICRO_REGISTRY_ADDRESS`.
|
||||
|
||||
## Memory limits
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ As the service name suggests, this service is based on [NATS](https://nats.io/)
|
||||
|
||||
By default, `nats-js-kv` is configured as embedded default registry via the `MICRO_REGISTRY` environment variable. If you do not want using the build-in nats registry, set `MICRO_REGISTRY_ADDRESS` to the address of the nats-js cluster, which is the same value as `OCIS_EVENTS_ENDPOINT`. Optionally use `MICRO_REGISTRY_AUTH_USERNAME` and `MICRO_REGISTRY_AUTH_PASSWORD` to authenticate with the external nats cluster.
|
||||
|
||||
Note that when `MICRO_REGISTRY` is configured using `kubernetes`, the NATS service will not be used but the Kubernetes registry. In this case, the `MICRO_REGISTRY_ADDRESS` environment variable needs to be set to the url of the Kubernetes registry.
|
||||
|
||||
## Persistance
|
||||
|
||||
To be able to deliver events even after a system or service restart, nats will store events in a folder on the local filesystem. This folder can be specified by setting the `NATS_NATS_STORE_DIR` enviroment variable. If not set, the service will fall back to `$OCIS_BASE_DATA_PATH/nats`.
|
||||
|
||||
Reference in New Issue
Block a user