Documentation ¶
Index ¶
- Variables
- func New(endpoints []string, options *registry.Config) (registry.Registry, error)
- func Register()
- type Consul
- func (s *Consul) Datacenters() ([]string, error)
- func (s *Consul) Deregister(dereg *registry.CatalogDeregistration, options *registry.WriteOptions) error
- func (s *Consul) Node(node string, options *registry.QueryOptions) (*registry.CatalogNode, error)
- func (s *Consul) Nodes(options *registry.QueryOptions) ([]*registry.Node, error)
- func (s *Consul) Register(reg *registry.CatalogRegistration, options *registry.WriteOptions) error
- func (s *Consul) Service(service, tag string, options *registry.QueryOptions) ([]*registry.CatalogService, error)
- func (s *Consul) Services(options *registry.QueryOptions) (map[string][]string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMultipleEndpointsUnsupported is thrown when there are // multiple endpoints specified for Consul ErrMultipleEndpointsUnsupported = errors.New("consul does not support multiple endpoints") // ErrSessionRenew is thrown when the session can't be // renewed because the Consul version does not support sessions ErrSessionRenew = errors.New("cannot set or renew session for ttl, unable to operate on sessions") )
Functions ¶
Types ¶
type Consul ¶
Consul is the receiver type for the Store interface
func (*Consul) Datacenters ¶
Datacenters lists known datacenters
func (*Consul) Deregister ¶
func (s *Consul) Deregister(dereg *registry.CatalogDeregistration, options *registry.WriteOptions) error
Deregister removes a node, service or check
func (*Consul) Node ¶
func (s *Consul) Node(node string, options *registry.QueryOptions) (*registry.CatalogNode, error)
Node lists the services provided by a given node
func (*Consul) Register ¶
func (s *Consul) Register(reg *registry.CatalogRegistration, options *registry.WriteOptions) error
func (*Consul) Service ¶
func (s *Consul) Service(service, tag string, options *registry.QueryOptions) ([]*registry.CatalogService, error)
Service lists the nodes in a given service
Click to show internal directories.
Click to hide internal directories.