mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 20:29:54 -06:00
Use MICRO_REGISTRY_ADDRESS env var for etcd address
This commit is contained in:
@@ -22,10 +22,14 @@ import (
|
||||
var DefaultClient = newGrpcClient()
|
||||
|
||||
func newGrpcClient() mclient.Client {
|
||||
addresses := strings.Split(os.Getenv("MICRO_REGISTRY_ADDRESS"), ",")
|
||||
|
||||
var r registry.Registry
|
||||
switch os.Getenv("MICRO_REGISTRY") {
|
||||
case "etcd":
|
||||
r = etcdr.NewRegistry()
|
||||
r = etcdr.NewRegistry(
|
||||
registry.Addrs(addresses...),
|
||||
)
|
||||
default:
|
||||
r = mdnsr.NewRegistry()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user