Versions in this module Expand all Collapse all v0 v0.9.1 Aug 9, 2017 Changes in this version + const ACLBootstrapInit + const ACLBootstrapNow + const ACLBootstrapRequestType + var ACLBootstrapNotAllowedErr = errors.New("ACL bootstrap no longer allowed") + var ACLBootstrapNotInitializedErr = errors.New(...) + type ACLBootstrap struct + AllowBootstrap bool type QueryTemplateOptions + RemoveEmptyTags bool v0.9.0 Jul 20, 2017 Changes in this version + const ConsulServiceID + const ConsulServiceName + const SerfCheckAliveOutput + const SerfCheckFailedOutput + const SerfCheckID + const SerfCheckName type AutopilotConfig + UpgradeVersionTag string type CheckType + func (c *CheckType) IsScript() bool v0.9.0-rc1 Jul 17, 2017 v0.8.5 Jun 27, 2017 Changes in this version + const ACLDelete + const ACLForceSet + const ACLSet + const ACLTypeClient + const ACLTypeManagement + const IgnoreUnknownTypeFlag + const KeyringInstall + const KeyringList + const KeyringRemove + const KeyringUse + const MaxLockDelay + const NodeMaint + const QueryTemplateTypeNamePrefixMatch + const ServiceMaintPrefix + const SessionTTLMax + const SessionTTLMultiplier + var ErrNoDCPath = fmt.Errorf("No path to datacenter") + var ErrNoLeader = fmt.Errorf("No cluster leader") + var ErrNoServers = fmt.Errorf("No known Consul servers") + var ErrNotReadyForConsistentReads = fmt.Errorf("Not ready to serve consistent reads") + func Decode(buf []byte, out interface{}) error + func Encode(t MessageType, msg interface{}) ([]byte, error) + func SatisfiesMetaFilters(meta map[string]string, filters map[string]string) bool + func ValidStatus(s string) bool + func ValidateMetadata(meta map[string]string) error + type ACL struct + ID string + Name string + Rules string + Type string + func (a *ACL) IsSame(other *ACL) bool + type ACLOp string + type ACLPolicy struct + ETag string + Parent string + Policy *acl.Policy + TTL time.Duration + type ACLPolicyRequest struct + ACL string + Datacenter string + ETag string + func (r *ACLPolicyRequest) RequestDatacenter() string + type ACLReplicationStatus struct + Enabled bool + LastError time.Time + LastSuccess time.Time + ReplicatedIndex uint64 + Running bool + SourceDatacenter string + type ACLRequest struct + ACL ACL + Datacenter string + Op ACLOp + func (r *ACLRequest) RequestDatacenter() string + type ACLRequests []*ACLRequest + type ACLSpecificRequest struct + ACL string + Datacenter string + func (r *ACLSpecificRequest) RequestDatacenter() string + type ACLs []*ACL + type AutopilotConfig struct + CleanupDeadServers bool + DisableUpgradeMigration bool + LastContactThreshold time.Duration + MaxTrailingLogs uint64 + RedundancyZoneTag string + ServerStabilizationTime time.Duration + type AutopilotSetConfigRequest struct + CAS bool + Config AutopilotConfig + Datacenter string + func (op *AutopilotSetConfigRequest) RequestDatacenter() string + type CheckDefinition struct + DeregisterCriticalServiceAfter time.Duration + DockerContainerID string + HTTP string + Header map[string][]string + ID types.CheckID + Interval time.Duration + Method string + Name string + Notes string + Script string + ServiceID string + Shell string + Status string + TCP string + TLSSkipVerify bool + TTL time.Duration + Timeout time.Duration + Token string + func (c *CheckDefinition) CheckType() *CheckType + func (c *CheckDefinition) HealthCheck(node string) *HealthCheck + type CheckServiceNode struct + Checks HealthChecks + Node *Node + Service *NodeService + type CheckServiceNodes []CheckServiceNode + func (nodes CheckServiceNodes) Filter(onlyPassing bool) CheckServiceNodes + func (nodes CheckServiceNodes) Shuffle() + type CheckType struct + CheckID types.CheckID + DeregisterCriticalServiceAfter time.Duration + DockerContainerID string + HTTP string + Header map[string][]string + Interval time.Duration + Method string + Name string + Notes string + Script string + Shell string + Status string + TCP string + TLSSkipVerify bool + TTL time.Duration + Timeout time.Duration + func (c *CheckType) IsDocker() bool + func (c *CheckType) IsHTTP() bool + func (c *CheckType) IsMonitor() bool + func (c *CheckType) IsTCP() bool + func (c *CheckType) IsTTL() bool + func (c *CheckType) Valid() bool + type CheckTypes []*CheckType + type ChecksInStateRequest struct + Datacenter string + NodeMetaFilters map[string]string + Source QuerySource + State string + func (r *ChecksInStateRequest) RequestDatacenter() string + type CompoundResponse interface + Add func(interface{}) + New func() interface{} + type Coordinate struct + Coord *coordinate.Coordinate + Node string + type CoordinateUpdateRequest struct + Coord *coordinate.Coordinate + Datacenter string + Node string + func (c *CoordinateUpdateRequest) RequestDatacenter() string + type Coordinates []*Coordinate + type DCSpecificRequest struct + Datacenter string + NodeMetaFilters map[string]string + Source QuerySource + func (r *DCSpecificRequest) RequestDatacenter() string + type DatacenterMap struct + AreaID types.AreaID + Coordinates Coordinates + Datacenter string + type DeregisterRequest struct + CheckID types.CheckID + Datacenter string + Node string + ServiceID string + func (r *DeregisterRequest) RequestDatacenter() string + type DirEntries []*DirEntry + type DirEntry struct + Flags uint64 + Key string + LockIndex uint64 + Session string + Value []byte + func (d *DirEntry) Clone() *DirEntry + type EventFireRequest struct + Datacenter string + Name string + Payload []byte + func (r *EventFireRequest) RequestDatacenter() string + type EventFireResponse struct + type HealthCheck struct + CheckID types.CheckID + Name string + Node string + Notes string + Output string + ServiceID string + ServiceName string + ServiceTags []string + Status string + func (c *HealthCheck) Clone() *HealthCheck + func (c *HealthCheck) IsSame(other *HealthCheck) bool + type HealthChecks []*HealthCheck + type IndexedACLs struct + ACLs ACLs + type IndexedCheckServiceNodes struct + Nodes CheckServiceNodes + type IndexedCoordinate struct + Coord *coordinate.Coordinate + type IndexedCoordinates struct + Coordinates Coordinates + type IndexedDirEntries struct + Entries DirEntries + type IndexedHealthChecks struct + HealthChecks HealthChecks + type IndexedKeyList struct + Keys []string + type IndexedNodeDump struct + Dump NodeDump + type IndexedNodeServices struct + NodeServices *NodeServices + type IndexedNodes struct + Nodes Nodes + type IndexedPreparedQueries struct + Queries PreparedQueries + type IndexedServiceNodes struct + ServiceNodes ServiceNodes + type IndexedServices struct + Services Services + type IndexedSessions struct + Sessions Sessions + type KVSRequest struct + Datacenter string + DirEnt DirEntry + Op api.KVOp + func (r *KVSRequest) RequestDatacenter() string + type KeyListRequest struct + Datacenter string + Prefix string + Seperator string + func (r *KeyListRequest) RequestDatacenter() string + type KeyRequest struct + Datacenter string + Key string + func (r *KeyRequest) RequestDatacenter() string + type KeyringOp string + type KeyringRequest struct + Datacenter string + Forwarded bool + Key string + Operation KeyringOp + RelayFactor uint8 + func (r *KeyringRequest) RequestDatacenter() string + type KeyringResponse struct + Datacenter string + Error string + Keys map[string]int + Messages map[string]string + NumNodes int + WAN bool + type KeyringResponses struct + Responses []*KeyringResponse + func (r *KeyringResponses) Add(v interface{}) + func (r *KeyringResponses) New() interface{} + type MessageType uint8 + const ACLRequestType + const AreaRequestType + const AutopilotRequestType + const CoordinateBatchUpdateType + const DeregisterRequestType + const KVSRequestType + const PreparedQueryRequestType + const RegisterRequestType + const SessionRequestType + const TombstoneRequestType + const TxnRequestType + type Node struct + Address string + Datacenter string + ID types.NodeID + Meta map[string]string + Node string + TaggedAddresses map[string]string + type NodeDump []*NodeInfo + type NodeInfo struct + Address string + Checks HealthChecks + ID types.NodeID + Meta map[string]string + Node string + Services []*NodeService + TaggedAddresses map[string]string + type NodeService struct + Address string + EnableTagOverride bool + ID string + Port int + Service string + Tags []string + func (s *NodeService) IsSame(other *NodeService) bool + func (s *NodeService) ToServiceNode(node string) *ServiceNode + type NodeServices struct + Node *Node + Services map[string]*NodeService + type NodeSpecificRequest struct + Datacenter string + Node string + func (r *NodeSpecificRequest) RequestDatacenter() string + type Nodes []*Node + type OperatorHealthReply struct + FailureTolerance int + Healthy bool + Servers []ServerHealth + type PreparedQueries []*PreparedQuery + type PreparedQuery struct + DNS QueryDNSOptions + ID string + Name string + Service ServiceQuery + Session string + Template QueryTemplateOptions + Token string + func (pq *PreparedQuery) GetACLPrefix() (string, bool) + type PreparedQueryExecuteRemoteRequest struct + Datacenter string + Limit int + Query PreparedQuery + func (q *PreparedQueryExecuteRemoteRequest) RequestDatacenter() string + type PreparedQueryExecuteRequest struct + Agent QuerySource + Datacenter string + Limit int + QueryIDOrName string + Source QuerySource + func (q *PreparedQueryExecuteRequest) RequestDatacenter() string + type PreparedQueryExecuteResponse struct + DNS QueryDNSOptions + Datacenter string + Failovers int + Nodes CheckServiceNodes + Service string + type PreparedQueryExplainResponse struct + Query PreparedQuery + type PreparedQueryOp string + const PreparedQueryCreate + const PreparedQueryDelete + const PreparedQueryUpdate + type PreparedQueryRequest struct + Datacenter string + Op PreparedQueryOp + Query *PreparedQuery + func (q *PreparedQueryRequest) RequestDatacenter() string + type PreparedQuerySpecificRequest struct + Datacenter string + QueryID string + func (q *PreparedQuerySpecificRequest) RequestDatacenter() string + type QueryDNSOptions struct + TTL string + type QueryDatacenterOptions struct + Datacenters []string + NearestN int + type QueryMeta struct + Index uint64 + KnownLeader bool + LastContact time.Duration + type QueryOptions struct + AllowStale bool + MaxQueryTime time.Duration + MinQueryIndex uint64 + RequireConsistent bool + Token string + func (q QueryOptions) ACLToken() string + func (q QueryOptions) AllowStaleRead() bool + func (q QueryOptions) IsRead() bool + type QuerySource struct + Datacenter string + Node string + type QueryTemplateOptions struct + Regexp string + Type string + type RPCInfo interface + ACLToken func() string + AllowStaleRead func() bool + IsRead func() bool + RequestDatacenter func() string + type RaftConfigurationResponse struct + Index uint64 + Servers []*RaftServer + type RaftIndex struct + CreateIndex uint64 + ModifyIndex uint64 + type RaftRemovePeerRequest struct + Address raft.ServerAddress + Datacenter string + ID raft.ServerID + func (op *RaftRemovePeerRequest) RequestDatacenter() string + type RaftServer struct + Address raft.ServerAddress + ID raft.ServerID + Leader bool + Node string + Voter bool + type RegisterRequest struct + Address string + Check *HealthCheck + Checks HealthChecks + Datacenter string + ID types.NodeID + Node string + NodeMeta map[string]string + Service *NodeService + SkipNodeUpdate bool + TaggedAddresses map[string]string + func (r *RegisterRequest) ChangesNode(node *Node) bool + func (r *RegisterRequest) RequestDatacenter() string + type ServerHealth struct + Address string + Healthy bool + ID string + LastContact time.Duration + LastIndex uint64 + LastTerm uint64 + Leader bool + Name string + SerfStatus serf.MemberStatus + StableSince time.Time + Version string + Voter bool + func (h *ServerHealth) IsHealthy(lastTerm uint64, leaderLastIndex uint64, autopilotConf *AutopilotConfig) bool + func (h *ServerHealth) IsStable(now time.Time, conf *AutopilotConfig) bool + type ServerStats struct + LastContact string + LastIndex uint64 + LastTerm uint64 + type ServiceDefinition struct + Address string + Check CheckType + Checks CheckTypes + EnableTagOverride bool + ID string + Name string + Port int + Tags []string + Token string + func (s *ServiceDefinition) CheckTypes() (checks CheckTypes) + func (s *ServiceDefinition) NodeService() *NodeService + type ServiceNode struct + Address string + Datacenter string + ID types.NodeID + Node string + NodeMeta map[string]string + ServiceAddress string + ServiceEnableTagOverride bool + ServiceID string + ServiceName string + ServicePort int + ServiceTags []string + TaggedAddresses map[string]string + func (s *ServiceNode) PartialClone() *ServiceNode + func (s *ServiceNode) ToNodeService() *NodeService + type ServiceNodes []*ServiceNode + type ServiceQuery struct + Failover QueryDatacenterOptions + Near string + NodeMeta map[string]string + OnlyPassing bool + Service string + Tags []string + type ServiceSpecificRequest struct + Datacenter string + NodeMetaFilters map[string]string + ServiceName string + ServiceTag string + Source QuerySource + TagFilter bool + func (r *ServiceSpecificRequest) RequestDatacenter() string + type Services map[string][]string + type Session struct + Behavior SessionBehavior + Checks []types.CheckID + ID string + LockDelay time.Duration + Name string + Node string + TTL string + type SessionBehavior string + const SessionKeysDelete + const SessionKeysRelease + type SessionOp string + const SessionCreate + const SessionDestroy + type SessionRequest struct + Datacenter string + Op SessionOp + Session Session + func (r *SessionRequest) RequestDatacenter() string + type SessionSpecificRequest struct + Datacenter string + Session string + func (r *SessionSpecificRequest) RequestDatacenter() string + type Sessions []*Session + type SnapshotOp int + const SnapshotRestore + const SnapshotSave + type SnapshotReplyFn func(reply *SnapshotResponse) error + type SnapshotRequest struct + AllowStale bool + Datacenter string + Op SnapshotOp + Token string + type SnapshotResponse struct + Error string + type TombstoneOp string + const TombstoneReap + type TombstoneRequest struct + Datacenter string + Op TombstoneOp + ReapIndex uint64 + func (r *TombstoneRequest) RequestDatacenter() string + type TxnError struct + OpIndex int + What string + func (e TxnError) Error() string + type TxnErrors []*TxnError + type TxnKVOp struct + DirEnt DirEntry + Verb api.KVOp + type TxnKVResult *DirEntry + type TxnOp struct + KV *TxnKVOp + type TxnOps []*TxnOp + type TxnReadRequest struct + Datacenter string + Ops TxnOps + func (r *TxnReadRequest) RequestDatacenter() string + type TxnReadResponse struct + type TxnRequest struct + Datacenter string + Ops TxnOps + func (r *TxnRequest) RequestDatacenter() string + type TxnResponse struct + Errors TxnErrors + Results TxnResults + type TxnResult struct + KV TxnKVResult + type TxnResults []*TxnResult + type WriteRequest struct + Token string + func (w WriteRequest) ACLToken() string + func (w WriteRequest) AllowStaleRead() bool + func (w WriteRequest) IsRead() bool