Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigHook ¶
func ConfigHook(raw interface{}) (discovery.ServiceBackend, error)
ConfigHook is the hook to register with the Consul backend
Types ¶
type ByServiceID ¶
type ByServiceID []*consul.ServiceEntry
ByServiceID implements the Sort interface because Go can't sort without it.
func (ByServiceID) Len ¶
func (se ByServiceID) Len() int
func (ByServiceID) Less ¶
func (se ByServiceID) Less(i, j int) bool
func (ByServiceID) Swap ¶
func (se ByServiceID) Swap(i, j int)
type Consul ¶
Consul is a service discovery backend for Hashicorp Consul
func NewConsulConfig ¶
NewConsulConfig creates a new service discovery backend for Consul
func (Consul) CheckForUpstreamChanges ¶
CheckForUpstreamChanges runs the health check
func (*Consul) Deregister ¶
func (c *Consul) Deregister(service *discovery.ServiceDefinition)
Deregister removes the node from Consul.
func (*Consul) MarkForMaintenance ¶
func (c *Consul) MarkForMaintenance(service *discovery.ServiceDefinition)
MarkForMaintenance removes the node from Consul.
func (*Consul) SendHeartbeat ¶
func (c *Consul) SendHeartbeat(service *discovery.ServiceDefinition)
SendHeartbeat writes a TTL check status=ok to the consul store. If consul has never seen this service, we register the service and its TTL check.
Click to show internal directories.
Click to hide internal directories.