Documentation
¶
Index ¶
- type CheckServiceNode
- type CheckType
- type CheckTypes
- type Config
- type Consul
- func (c *Consul) Catalog()
- func (c *Consul) Deregister(ins *naming.Instance) (err error)
- func (c *Consul) Fetch(svc naming.Service) (nodes []naming.Instance, initialized bool)
- func (c *Consul) Register(ins *naming.Instance) (err error)
- func (c *Consul) Scheme() string
- func (c *Consul) Subscribe(svc naming.Service) naming.Watcher
- type HealthCheck
- type HealthChecks
- type Node
- type NodeService
- type RaftIndex
- type ServiceDefinition
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckServiceNode ¶
type CheckServiceNode struct {
Node *Node
Service *NodeService
Checks HealthChecks
}
type CheckType ¶
type CheckType struct {
CheckID string
Name string
Status string
Notes string
ScriptArgs []string
HTTP string
Header map[string][]string
Method string
TCP string
Interval time.Duration
DockerContainerID string
Shell string
TLSSkipVerify bool
Timeout time.Duration
TTL time.Duration
// DeregisterCriticalServiceAfter, if >0, will cause the associated
// service, if any, to be deregistered if this check is critical for
// longer than this duration.
DeregisterCriticalServiceAfter time.Duration
}
type CheckTypes ¶
type CheckTypes []*CheckType
type Consul ¶
type Consul struct {
// contains filtered or unexported fields
}
func DefaultConsul ¶
func DefaultConsul() *Consul
type HealthCheck ¶
type HealthCheck struct {
Node string
CheckID string // Unique per-node ID
Name string // Check name
Status string // The current check status
Notes string // Additional notes with the status
Output string // Holds output of script runs
ServiceID string // optional associated service
ServiceName string // optional service name
ServiceTags []string // optional service tags
RaftIndex
}
HealthCheck represents a single check on a given node
type HealthChecks ¶
type HealthChecks []*HealthCheck
type Node ¶
type Node struct {
ID string
Node string
Address string
Datacenter string
TaggedAddresses map[string]string
Meta map[string]string
RaftIndex
}
Used to return information about a node
type NodeService ¶
type NodeService struct {
ID string
Service string
Tags []string
Address string
Meta map[string]string
Port int
EnableTagOverride bool
RaftIndex
}
NodeService is a service provided by a node
type RaftIndex ¶
RaftIndex is used to track the index used while creating or modifying a given struct type.
type ServiceDefinition ¶
Click to show internal directories.
Click to hide internal directories.