MCPcopy
hub / github.com/micro/go-micro / Registry

Interface Registry

registry/registry.go:18–27  ·  view source on GitHub ↗

The registry provides an interface for service discovery and an abstraction over varying implementations {consul, etcd, zookeeper, ...}.

Source from the content-addressed store, hash-verified

16// and an abstraction over varying implementations
17// {consul, etcd, zookeeper, ...}.
18type Registry interface {
19 Init(...Option) error
20 Options() Options
21 Register(*Service, ...RegisterOption) error
22 Deregister(*Service, ...DeregisterOption) error
23 GetService(string, ...GetOption) ([]*Service, error)
24 ListServices(...ListOption) ([]*Service, error)
25 Watch(...WatchOption) (Watcher, error)
26 String() string
27}
28
29type Service struct {
30 Name string `json:"name"`

Callers 43

TestWatchQueryTopicFunction · 0.95
TestMDNSFunction · 0.65
TestWatcherFunction · 0.65
TestMemoryRegistryFunction · 0.65
TestMemoryRegistryTTLFunction · 0.65
RegisterFunction · 0.65
TestKeepAliveManagementFunction · 0.65
StopMethod · 0.65
TestMDNSFunction · 0.65
TestWatcherFunction · 0.65
TestMemoryRegistryFunction · 0.65

Implementers 7

memRegistryregistry/memory.go
mdnsRegistryregistry/mdns_registry.go
mockRegistryregistry/cache/cache_test.go
etcdRegistryregistry/etcd/etcd.go
consulRegistryregistry/consul/consul.go
natsRegistryregistry/nats/nats.go
fakeRegistryhealth/registry_check_test.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…