Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Service(service string, tag string, queryOpts *consul.QueryOptions) ([]*consul.ServiceEntry, *consul.QueryMeta, error)
}
Client is a wrapper around the Consul API.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher yields endpoints for a service in Consul. Updates to the service are watched and will update the Publisher endpoints.
func NewPublisher ¶
func NewPublisher( client Client, factory loadbalancer.Factory, logger log.Logger, service string, tags ...string, ) (*Publisher, error)
NewPublisher returns a Consul publisher which returns Endpoints for the requested service. It only returns instances for which all of the passed tags are present.