diff --git a/discovery/file/file.go b/discovery/file/file.go index 994f0aefd4..3e1566ea59 100644 --- a/discovery/file/file.go +++ b/discovery/file/file.go @@ -16,6 +16,11 @@ type Discovery struct { } func init() { + Init() +} + +// Init is exported +func Init() { discovery.Register("file", &Discovery{}) } diff --git a/discovery/kv/kv.go b/discovery/kv/kv.go index 1970e4f7fb..64850bfeda 100644 --- a/discovery/kv/kv.go +++ b/discovery/kv/kv.go @@ -21,6 +21,11 @@ type Discovery struct { } func init() { + Init() +} + +// Init is exported +func Init() { discovery.Register("zk", &Discovery{backend: store.ZK}) discovery.Register("consul", &Discovery{backend: store.CONSUL}) discovery.Register("etcd", &Discovery{backend: store.ETCD}) diff --git a/discovery/nodes/nodes.go b/discovery/nodes/nodes.go index b93208186d..7de7ae2f57 100644 --- a/discovery/nodes/nodes.go +++ b/discovery/nodes/nodes.go @@ -13,6 +13,11 @@ type Discovery struct { } func init() { + Init() +} + +// Init is exported +func Init() { discovery.Register("nodes", &Discovery{}) } diff --git a/discovery/token/token.go b/discovery/token/token.go index cca6f27b79..71f03b7179 100644 --- a/discovery/token/token.go +++ b/discovery/token/token.go @@ -24,6 +24,11 @@ type Discovery struct { } func init() { + Init() +} + +// Init is exported +func Init() { discovery.Register("token", &Discovery{}) }