Versions in this module Expand all Collapse all v1 v1.0.1 Jul 22, 2018 v1.0.0 Apr 3, 2018 Changes in this version + const SessionDelete + const SessionMaximumLockDelay + const SessionMaximumTTL + const SessionMinimumLockDelay + const SessionMinimumTTL + const SessionRelease + type Agent interface + MaintenanceMode func(enabled bool, reason string) error + Members func(wan bool) ([]AgentInfo, error) + Reload func() error + Self func() (AgentInfo, error) + type AgentInfo struct + Address string + Name string + Port int + Tags map[string]string + type AsLeaderFunc func(context.Context) error + type Candidate interface + Participate func(LeadershipConfig, AsLeaderFunc) (LeaderSession, error) + type Catalog interface + Datacenters func() ([]string, error) + Node func(dc, name string) (NodeInfo, error) + Nodes func(dc string) ([]Node, error) + Service func(dc, service string, tags ...string) ([]Service, error) + Services func(dc string) (map[string][]string, error) + type Client interface + func New(opts ClientOptions) Client + type ClientOptions struct + Address string + HTTPTimeout time.Duration + Logger *log.Logger + SkipTLSVerification bool + Token string + type KV interface + Delete func(dc, path string) error + Get func(dc, path string) (string, error) + Keys func(dc, path string) ([]string, error) + Put func(dc, path, value string) error + Recurse func(dc, path string) ([][2]string, error) + type LeaderSession interface + Abdicate func() error + Current func() (string, error) + SessionID func() string + type LeadershipConfig struct + ContactInfo string + Description string + Key string + LockDelay time.Duration + TTL time.Duration + type Node struct + Address string + Name string + TaggedAddresses map[string]string + type NodeInfo struct + Node struct{ ... } + Services map[string]struct{ ... } + type RequestError struct + func (h *RequestError) Error() string + func (h *RequestError) StatusCode() int + type Service struct + Address string + Node string + ServiceAddress string + ServiceID string + ServiceName string + ServicePort int + ServiceTags []string + TaggedAddresses map[string]string + type Session interface + CreateSession func(dc string, config SessionConfig) (SessionID, error) + DeleteSession func(dc string, id SessionID) error + ListSessions func(dc, node string) (map[SessionID]SessionConfig, error) + ReadSession func(dc string, id SessionID) (SessionConfig, error) + RenewSession func(dc string, id SessionID) (time.Duration, error) + type SessionConfig struct + Behavior SessionTerminationBehavior + LockDelay time.Duration + Name string + Node string + TTL time.Duration + type SessionID string + type SessionTerminationBehavior string