Documentation ¶
Overview ¶
Package etcd implements service Registry and Discovery using etcd.
Index ¶
- Constants
- type Option
- type Registry
- func (r *Registry) Deregister(ctx context.Context, service gsvc.Service) error
- func (r *Registry) Register(ctx context.Context, service gsvc.Service) (gsvc.Service, error)
- func (r *Registry) Search(ctx context.Context, in gsvc.SearchInput) ([]gsvc.Service, error)
- func (r *Registry) Watch(ctx context.Context, key string) (gsvc.Watcher, error)
Constants ¶
View Source
const ( // DefaultKeepAliveTTL is the default keepalive TTL. DefaultKeepAliveTTL = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry implements gsvc.Registry interface.
func NewWithClient ¶
NewWithClient creates and returns a new etcd registry with the given client.
func (*Registry) Deregister ¶
Deregister implements the gsvc.Deregister interface.
Click to show internal directories.
Click to hide internal directories.