Versions in this module Expand all Collapse all v0 v0.9.0 Jul 20, 2017 Changes in this version + const DefaultDockerHost + func NewLocalState(c *Config, lg *log.Logger) *localState + func ParseHost(host string) (string, string, string, error) type Agent + func (a *Agent) TranslateAddress(dc string, addr string, taggedAddresses map[string]string) string + func (a *Agent) TranslateAddresses(dc string, subj interface{}) type Autopilot + UpgradeVersionTag string + type Blacklist struct + func NewBlacklist(prefixes []string) *Blacklist + func (b *Blacklist) Block(path string) bool type Config + EnableScriptChecks bool type DockerClient + func NewDockerClient(host string, maxbuf int64) (*DockerClient, error) type HTTPConfig + BlockEndpoints []string type TestAgent + func (a *TestAgent) DNSDisableCompression(b bool) v0.9.0-rc1 Jul 17, 2017 v0.8.5 Jun 27, 2017 Changes in this version + const CheckBufSize + const MinInterval + const SerfLANKeyring + const SerfWANKeyring + const UserAgent + const WatchBufSize + var TempDir = os.TempDir() + func ACLDisabled(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func Asset(name string) ([]byte, error) + func AssetDir(name string) ([]string, error) + func AssetInfo(name string) (os.FileInfo, error) + func AssetNames() []string + func Bool(b bool) *bool + func DecodeCheckDefinition(raw interface{}) (*structs.CheckDefinition, error) + func DecodeServiceDefinition(raw interface{}) (*structs.ServiceDefinition, error) + func Duration(d time.Duration) *time.Duration + func ExecScript(script string) (*exec.Cmd, error) + func FixupCheckType(raw interface{}) error + func FixupConfigDurations(raw interface{}) error + func FixupLockDelay(raw interface{}) error + func MustAsset(name string) []byte + func ParseMetaPair(raw string) (string, string) + func ParseRelayFactor(n int) (uint8, error) + func RestoreAsset(dir, name string) error + func RestoreAssets(dir, name string) error + func TenPorts() int + func Uint64(i uint64) *uint64 + func UniqueID() string + type AddressConfig struct + DNS string + HTTP string + HTTPS string + RPC string + type AdvertiseAddrsConfig struct + RPC *net.TCPAddr + RPCRaw string + SerfLan *net.TCPAddr + SerfLanRaw string + SerfWan *net.TCPAddr + SerfWanRaw string + type Agent struct + LogOutput io.Writer + LogWriter *logger.LogWriter + func New(c *Config) (*Agent, error) + func (a *Agent) AddCheck(check *structs.HealthCheck, chkType *structs.CheckType, persist bool, ...) error + func (a *Agent) AddService(service *structs.NodeService, chkTypes []*structs.CheckType, persist bool, ...) error + func (a *Agent) DisableNodeMaintenance() + func (a *Agent) DisableServiceMaintenance(serviceID string) error + func (a *Agent) EnableNodeMaintenance(reason, token string) + func (a *Agent) EnableServiceMaintenance(serviceID, reason, token string) error + func (a *Agent) ForceLeave(node string) (err error) + func (a *Agent) GetLANCoordinate() (*coordinate.Coordinate, error) + func (a *Agent) GossipEncrypted() bool + func (a *Agent) InstallKey(key, token string, relayFactor uint8) (*structs.KeyringResponses, error) + func (a *Agent) JoinLAN(addrs []string) (n int, err error) + func (a *Agent) JoinWAN(addrs []string) (n int, err error) + func (a *Agent) LANMembers() []serf.Member + func (a *Agent) LastUserEvent() *UserEvent + func (a *Agent) Leave() error + func (a *Agent) ListKeys(token string, relayFactor uint8) (*structs.KeyringResponses, error) + func (a *Agent) LocalMember() serf.Member + func (a *Agent) PauseSync() + func (a *Agent) RPC(method string, args interface{}, reply interface{}) error + func (a *Agent) ReloadCh() chan chan error + func (a *Agent) ReloadConfig(newCfg *Config) error + func (a *Agent) RemoveCheck(checkID types.CheckID, persist bool) error + func (a *Agent) RemoveKey(key, token string, relayFactor uint8) (*structs.KeyringResponses, error) + func (a *Agent) RemoveService(serviceID string, persist bool) error + func (a *Agent) ResumeSync() + func (a *Agent) RetryJoinCh() <-chan error + func (a *Agent) ShutdownAgent() error + func (a *Agent) ShutdownCh() <-chan struct{} + func (a *Agent) ShutdownEndpoints() + func (a *Agent) SnapshotRPC(args *structs.SnapshotRequest, in io.Reader, out io.Writer, ...) error + func (a *Agent) Start() error + func (a *Agent) StartSync() + func (a *Agent) Stats() map[string]map[string]string + func (a *Agent) UseKey(key, token string, relayFactor uint8) (*structs.KeyringResponses, error) + func (a *Agent) UserEvent(dc, token string, params *UserEvent) error + func (a *Agent) UserEvents() []*UserEvent + func (a *Agent) WANMembers() []serf.Member + type Autopilot struct + CleanupDeadServers *bool + DisableUpgradeMigration *bool + LastContactThreshold *time.Duration + LastContactThresholdRaw string + MaxTrailingLogs *uint64 + RedundancyZoneTag string + ServerStabilizationTime *time.Duration + ServerStabilizationTimeRaw string + type CheckDocker struct + CheckID types.CheckID + DockerContainerID string + Interval time.Duration + Logger *log.Logger + Notify CheckNotifier + Script string + Shell string + func (c *CheckDocker) Init() error + func (c *CheckDocker) Start() + func (c *CheckDocker) Stop() + type CheckHTTP struct + CheckID types.CheckID + HTTP string + Header map[string][]string + Interval time.Duration + Logger *log.Logger + Method string + Notify CheckNotifier + TLSSkipVerify bool + Timeout time.Duration + func (c *CheckHTTP) Start() + func (c *CheckHTTP) Stop() + type CheckMonitor struct + CheckID types.CheckID + Interval time.Duration + Logger *log.Logger + Notify CheckNotifier + Script string + Timeout time.Duration + func (c *CheckMonitor) Start() + func (c *CheckMonitor) Stop() + type CheckNotifier interface + UpdateCheck func(checkID types.CheckID, status, output string) + type CheckTCP struct + CheckID types.CheckID + Interval time.Duration + Logger *log.Logger + Notify CheckNotifier + TCP string + Timeout time.Duration + func (c *CheckTCP) Start() + func (c *CheckTCP) Stop() + type CheckTTL struct + CheckID types.CheckID + Logger *log.Logger + Notify CheckNotifier + TTL time.Duration + func (c *CheckTTL) SetStatus(status, output string) + func (c *CheckTTL) Start() + func (c *CheckTTL) Stop() + type Config struct + ACLAgentMasterToken string + ACLAgentToken string + ACLDatacenter string + ACLDefaultPolicy string + ACLDisabledTTL time.Duration + ACLDownPolicy string + ACLEnforceVersion8 *bool + ACLMasterToken string + ACLReplicationToken string + ACLTTL time.Duration + ACLTTLRaw string + ACLToken string + AEInterval time.Duration + Addresses AddressConfig + AdvertiseAddr string + AdvertiseAddrWan string + AdvertiseAddrs AdvertiseAddrsConfig + Autopilot Autopilot + BindAddr string + Bootstrap bool + BootstrapExpect int + CAFile string + CAPath string + CertFile string + CheckDeregisterIntervalMin time.Duration + CheckReapInterval time.Duration + CheckUpdateInterval time.Duration + CheckUpdateIntervalRaw string + Checks []*structs.CheckDefinition + ClientAddr string + ConsulConfig *consul.Config + DNSConfig DNSConfig + DNSRecursor string + DNSRecursors []string + DataDir string + Datacenter string + DeprecatedAtlasACLToken string + DeprecatedAtlasEndpoint string + DeprecatedAtlasInfrastructure string + DeprecatedAtlasJoin bool + DeprecatedAtlasToken string + DeprecatedHTTPAPIResponseHeaders map[string]string + DevMode bool + DisableAnonymousSignature bool + DisableCoordinates bool + DisableHostNodeID *bool + DisableKeyringFile bool + DisableRemoteExec *bool + DisableUpdateCheck bool + Domain string + EnableDebug bool + EnableSyslog bool + EnableUI bool + EncryptKey string + EncryptVerifyIncoming *bool + EncryptVerifyOutgoing *bool + HTTPConfig HTTPConfig + KeyFile string + LeaveOnTerm *bool + LogLevel string + Meta map[string]string + NodeID types.NodeID + NodeName string + NonVotingServer bool + Performance Performance + PidFile string + Ports PortConfig + Protocol int + RaftProtocol int + ReconnectTimeoutLan time.Duration + ReconnectTimeoutLanRaw string + ReconnectTimeoutWan time.Duration + ReconnectTimeoutWanRaw string + RejoinAfterLeave bool + RetryInterval time.Duration + RetryIntervalRaw string + RetryIntervalWan time.Duration + RetryIntervalWanRaw string + RetryJoin []string + RetryJoinAzure RetryJoinAzure + RetryJoinEC2 RetryJoinEC2 + RetryJoinGCE RetryJoinGCE + RetryJoinWan []string + RetryMaxAttempts int + RetryMaxAttemptsWan int + Revision string + SerfLanBindAddr string + SerfWanBindAddr string + Server bool + ServerName string + Services []*structs.ServiceDefinition + SessionTTLMin time.Duration + SessionTTLMinRaw string + SkipLeaveOnInt *bool + StartJoin []string + StartJoinWan []string + SyncCoordinateIntervalMin time.Duration + SyncCoordinateRateTarget float64 + SyslogFacility string + TLSCipherSuites []uint16 + TLSCipherSuitesRaw string + TLSMinVersion string + TLSPreferServerCipherSuites bool + TaggedAddresses map[string]string + Telemetry Telemetry + TranslateWanAddrs bool + UIDir string + UnixSockets UnixSocketConfig + VerifyIncoming bool + VerifyIncomingHTTPS bool + VerifyIncomingRPC bool + VerifyOutgoing bool + VerifyServerHostname bool + Version string + VersionPrerelease string + WatchPlans []*watch.Plan + Watches []map[string]interface{} + func DecodeConfig(r io.Reader) (*Config, error) + func DefaultConfig() *Config + func DevConfig() *Config + func MergeConfig(a, b *Config) *Config + func ReadConfigPaths(paths []string) (*Config, error) + func TestACLConfig() *Config + func TestConfig() *Config + func (c *Config) ClientListener(override string, port int) (net.Addr, error) + func (c *Config) DNSAddrs() ([]ProtoAddr, error) + func (c *Config) EncryptBytes() ([]byte, error) + func (c *Config) GetTokenForAgent() string + func (c *Config) HTTPAddrs() ([]ProtoAddr, error) + func (c *Config) IncomingHTTPSConfig() (*tls.Config, error) + func (c *Config) VerifyUniqueListeners() error + type CriticalCheck struct + Check *structs.HealthCheck + CriticalFor time.Duration + type DNSConfig struct + AllowStale *bool + DisableCompression bool + EnableTruncate bool + MaxStale time.Duration + MaxStaleRaw string + NodeTTL time.Duration + NodeTTLRaw string + OnlyPassing bool + RecursorTimeout time.Duration + RecursorTimeoutRaw string + ServiceTTL map[string]time.Duration + ServiceTTLRaw map[string]string + UDPAnswerLimit int + type DNSServer struct + func NewDNSServer(a *Agent) (*DNSServer, error) + func (s *DNSServer) ListenAndServe(network, addr string, notif func()) error + type DockerClient interface + CreateExec func(docker.CreateExecOptions) (*docker.Exec, error) + InspectExec func(string) (*docker.ExecInspect, error) + StartExec func(string, docker.StartExecOptions) error + type FilePermissions interface + Group func() string + Mode func() string + User func() string + type HTTPConfig struct + ResponseHeaders map[string]string + type HTTPServer struct + func NewHTTPServer(addr string, a *Agent) *HTTPServer + func (s *HTTPServer) ACLClone(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLCreate(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLDestroy(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLGet(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLList(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLReplicationStatus(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLUpdate(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentCheckFail(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentCheckPass(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentCheckUpdate(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentCheckWarn(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentChecks(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentDeregisterCheck(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentDeregisterService(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentForceLeave(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentJoin(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentLeave(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentMembers(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentMonitor(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentNodeMaintenance(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentRegisterCheck(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentRegisterService(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentReload(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentSelf(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentServiceMaintenance(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentServices(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CatalogDatacenters(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CatalogDeregister(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CatalogNodeServices(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CatalogNodes(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CatalogRegister(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CatalogServiceNodes(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CatalogServices(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CoordinateDatacenters(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CoordinateNodes(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EventFire(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EventList(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) HealthChecksInState(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) HealthNodeChecks(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) HealthServiceChecks(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) HealthServiceNodes(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Index(resp http.ResponseWriter, req *http.Request) + func (s *HTTPServer) IsUIEnabled() bool + func (s *HTTPServer) KVSDelete(resp http.ResponseWriter, req *http.Request, args *structs.KeyRequest) (interface{}, error) + func (s *HTTPServer) KVSEndpoint(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) KVSGet(resp http.ResponseWriter, req *http.Request, args *structs.KeyRequest) (interface{}, error) + func (s *HTTPServer) KVSGetKeys(resp http.ResponseWriter, req *http.Request, args *structs.KeyRequest) (interface{}, error) + func (s *HTTPServer) KVSPut(resp http.ResponseWriter, req *http.Request, args *structs.KeyRequest) (interface{}, error) + func (s *HTTPServer) KeyringInstall(resp http.ResponseWriter, req *http.Request, args *keyringArgs) (interface{}, error) + func (s *HTTPServer) KeyringList(resp http.ResponseWriter, req *http.Request, args *keyringArgs) (interface{}, error) + func (s *HTTPServer) KeyringRemove(resp http.ResponseWriter, req *http.Request, args *keyringArgs) (interface{}, error) + func (s *HTTPServer) KeyringUse(resp http.ResponseWriter, req *http.Request, args *keyringArgs) (interface{}, error) + func (s *HTTPServer) OperatorAutopilotConfiguration(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorKeyringEndpoint(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorRaftConfiguration(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorRaftPeer(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorServerHealth(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) PreparedQueryGeneral(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) PreparedQuerySpecific(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SessionCreate(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SessionDestroy(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SessionGet(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SessionList(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SessionRenew(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SessionsForNode(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Snapshot(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) StatusLeader(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) StatusPeers(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Txn(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) UINodeInfo(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) UINodes(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) UIServices(resp http.ResponseWriter, req *http.Request) (interface{}, error) + type NotifyGroup struct + func (n *NotifyGroup) Clear(ch chan struct{}) + func (n *NotifyGroup) Notify() + func (n *NotifyGroup) Wait(ch chan struct{}) + func (n *NotifyGroup) WaitCh() chan struct{} + type Performance struct + RaftMultiplier uint + type PortConfig struct + DNS int + HTTP int + HTTPS int + RPC int + SerfLan int + SerfWan int + Server int + type ProtoAddr struct + Addr string + Net string + Proto string + func (p ProtoAddr) String() string + type RetryJoinAzure struct + ClientID string + SecretAccessKey string + SubscriptionID string + TagName string + TagValue string + TenantID string + type RetryJoinEC2 struct + AccessKeyID string + Region string + SecretAccessKey string + TagKey string + TagValue string + type RetryJoinGCE struct + CredentialsFile string + ProjectName string + TagValue string + ZonePattern string + type Self struct + Config *Config + Coord *coordinate.Coordinate + Member serf.Member + Meta map[string]string + Stats map[string]map[string]string + type ServiceSummary struct + ChecksCritical int + ChecksPassing int + ChecksWarning int + Name string + Nodes []string + type Telemetry struct + CirconusAPIApp string + CirconusAPIToken string + CirconusAPIURL string + CirconusBrokerID string + CirconusBrokerSelectTag string + CirconusCheckDisplayName string + CirconusCheckForceMetricActivation string + CirconusCheckID string + CirconusCheckInstanceID string + CirconusCheckSearchTag string + CirconusCheckSubmissionURL string + CirconusCheckTags string + CirconusSubmissionInterval string + DisableHostname bool + DogStatsdAddr string + DogStatsdTags []string + StatsdAddr string + StatsiteAddr string + StatsitePrefix string + func (s *Telemetry) GoString() string + type TestAgent struct + Config *Config + DataDir string + Key string + LogOutput io.Writer + LogWriter *logger.LogWriter + Name string + NoInitialSync bool + func NewTestAgent(name string, c *Config) *TestAgent + func (a *TestAgent) Client() *api.Client + func (a *TestAgent) HTTPAddr() string + func (a *TestAgent) Shutdown() error + func (a *TestAgent) Start() *TestAgent + type UnixSocketConfig struct + type UnixSocketPermissions struct + Grp string + Perms string + Usr string + func (u UnixSocketPermissions) Group() string + func (u UnixSocketPermissions) Mode() string + func (u UnixSocketPermissions) User() string + type UserEvent struct + ID string + LTime uint64 + Name string + NodeFilter string + Payload []byte + ServiceFilter string + TagFilter string + Version int