Documentation ¶
Index ¶
- Variables
- func Deregister(s *regpb.Service) error
- func GetService(name string) ([]*regpb.Service, error)
- func ListServices() ([]*regpb.Service, error)
- func Register(s *regpb.Service, opts ...RegisterOption) error
- func String() string
- type DeregisterOption
- type DeregisterOptions
- type GetOption
- type GetOptions
- type ListOption
- type ListOptions
- type OpenAPIOption
- type OpenAPIOptions
- type Option
- type Options
- type RegisterOption
- type RegisterOptions
- type Registry
- type WatchOption
- type WatchOptions
- type Watcher
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetService ¶
GetService retrieve a service. A slice is returned since we separate Name/Version.
func ListServices ¶
ListServices list the services. Only returns service names
Types ¶
type DeregisterOption ¶
type DeregisterOption func(*DeregisterOptions)
func DeregisterContext ¶
func DeregisterContext(ctx context.Context) DeregisterOption
type DeregisterOptions ¶
type GetOptions ¶
type ListOption ¶
type ListOption func(*ListOptions)
func ListContext ¶
func ListContext(ctx context.Context) ListOption
type ListOptions ¶
type OpenAPIOption ¶
type OpenAPIOption func(*OpenAPIOptions)
type OpenAPIOptions ¶
type RegisterOption ¶
type RegisterOption func(*RegisterOptions)
func RegisterContext ¶
func RegisterContext(ctx context.Context) RegisterOption
func RegisterTTL ¶
func RegisterTTL(t time.Duration) RegisterOption
type RegisterOptions ¶
type Registry ¶
type Registry interface { Init(...Option) error Options() Options Register(*regpb.Service, ...RegisterOption) error Deregister(*regpb.Service, ...DeregisterOption) error GetService(string, ...GetOption) ([]*regpb.Service, error) ListServices(...ListOption) ([]*regpb.Service, error) Watch(...WatchOption) (Watcher, error) String() string }
Registry the registry provides an interface for service discovery and an abstraction over varying implementations {consul, etcd, zookeeper, ...}
type WatchOption ¶
type WatchOption func(*WatchOptions)
func WatchContext ¶
func WatchContext(ctx context.Context) WatchOption
type WatchOptions ¶
Directories ¶
Path | Synopsis |
---|---|
Package grpc service uses the registry service
|
Package grpc service uses the registry service |
Package mdns provides a multicast dns registry
|
Package mdns provides a multicast dns registry |
Package memory provides an in-memory registry
|
Package memory provides an in-memory registry |
Click to show internal directories.
Click to hide internal directories.