Versions in this module Expand all Collapse all v0 v0.7.1 Dec 20, 2017 Changes in this version + const ErrEntOnly + const ErrInvalidMethod + const OriginEnd + const OriginStart + var HeartbeatStreamFrame = &StreamFrame + var TempDir = os.TempDir() + func ApiConstraintToStructs(c1 *api.Constraint, c2 *structs.Constraint) + func ApiJobToStructJob(job *api.Job) *structs.Job + func ApiTaskToStructsTask(apiTask *api.Task, structsTask *structs.Task) + func ApiTgToStructsTG(taskGroup *api.TaskGroup, tg *structs.TaskGroup) + func LevelFilter() *logutils.LevelFilter + func NewLogWriter(buf int) *logWriter + func ValidateLevelFilter(minLevel logutils.LogLevel, filter *logutils.LevelFilter) bool + type ACLConfig struct + Enabled bool + PolicyTTL time.Duration + ReplicationToken string + TokenTTL time.Duration + func (a *ACLConfig) Merge(b *ACLConfig) *ACLConfig + type Addresses struct + HTTP string + RPC string + Serf string + func (a *Addresses) Merge(b *Addresses) *Addresses + type AdvertiseAddrs struct + HTTP string + RPC string + Serf string + func (a *AdvertiseAddrs) Merge(b *AdvertiseAddrs) *AdvertiseAddrs + type Agent struct + InmemSink *metrics.InmemSink + func NewAgent(config *Config, logOutput io.Writer, inmem *metrics.InmemSink) (*Agent, error) + func (a *Agent) Client() *client.Client + func (a *Agent) GetConfig() *Config + func (a *Agent) Leave() error + func (a *Agent) RPC(method string, args interface{}, reply interface{}) error + func (a *Agent) Reload(newConfig *Config) error + func (a *Agent) Server() *nomad.Server + func (a *Agent) Shutdown() error + func (a *Agent) Stats() map[string]map[string]string + type ClientConfig struct + AllocDir string + ChrootEnv map[string]string + ClientMaxPort int + ClientMinPort int + CpuCompute int + Enabled bool + GCDiskUsageThreshold float64 + GCInodeUsageThreshold float64 + GCInterval time.Duration + GCMaxAllocs int + GCParallelDestroys int + MaxKillTimeout string + Meta map[string]string + NetworkInterface string + NetworkSpeed int + NoHostUUID *bool + NodeClass string + Options map[string]string + Reserved *Resources + Servers []string + StateDir string + func (a *ClientConfig) Merge(b *ClientConfig) *ClientConfig + type Command struct + ShutdownCh <-chan struct{} + Ui cli.Ui + Version *version.VersionInfo + func (c *Command) AutocompleteArgs() complete.Predictor + func (c *Command) AutocompleteFlags() complete.Flags + func (c *Command) Help() string + func (c *Command) Run(args []string) int + func (c *Command) Synopsis() string + type Config struct + ACL *ACLConfig + Addresses *Addresses + AdvertiseAddrs *AdvertiseAddrs + BindAddr string + Client *ClientConfig + ClientConfig *client.Config + Consul *config.ConsulConfig + DataDir string + Datacenter string + DevMode bool + DisableAnonymousSignature bool + DisableUpdateCheck bool + EnableDebug bool + EnableSyslog bool + Files []string + HTTPAPIResponseHeaders map[string]string + LeaveOnInt bool + LeaveOnTerm bool + LogLevel string + NodeName string + NomadConfig *nomad.Config + Ports *Ports + Region string + Sentinel *config.SentinelConfig + Server *ServerConfig + SyslogFacility string + TLSConfig *config.TLSConfig + Telemetry *Telemetry + Vault *config.VaultConfig + Version *version.VersionInfo + func DefaultConfig() *Config + func DevConfig() *Config + func LoadConfig(path string) (*Config, error) + func LoadConfigDir(dir string) (*Config, error) + func ParseConfig(r io.Reader) (*Config, error) + func ParseConfigFile(path string) (*Config, error) + func (c *Config) Listener(proto, addr string, port int) (net.Listener, error) + func (c *Config) Merge(b *Config) *Config + type HTTPCodedError interface + Code func() int + func CodedError(c int, s string) HTTPCodedError + type HTTPServer struct + Addr string + func NewHTTPServer(agent *Agent, config *Config) (*HTTPServer, error) + func (s *HTTPServer) ACLPoliciesRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLPolicySpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLTokenBootstrap(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLTokenSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLTokensRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentForceLeaveRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentJoinRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentMembersRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentSelfRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentServersRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AllocSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AllocsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ClientAllocRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ClientGCRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ClientStatsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) DeploymentSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) DeploymentsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) DirectoryListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EvalSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EvalsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FileCatRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FileReadAtRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FileStatRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) GarbageCollectRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) HealthRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) JobSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) JobsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) KeyringOperationRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Logs(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) MetricsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NodeSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NodesRequest(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) OperatorRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ReconcileJobSummaries(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) RegionListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SearchRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Shutdown() + func (s *HTTPServer) StatusLeaderRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) StatusPeersRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Stream(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ValidateJobRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + type LogHandler interface + HandleLog func(string) + type Member struct + Addr net.IP + DelegateCur uint8 + DelegateMax uint8 + DelegateMin uint8 + Name string + Port uint16 + ProtocolCur uint8 + ProtocolMax uint8 + ProtocolMin uint8 + Status string + Tags map[string]string + type Ports struct + HTTP int + RPC int + Serf int + func (a *Ports) Merge(b *Ports) *Ports + type ReadCloserWrapper struct + func (x *ReadCloserWrapper) CodecDecodeSelf(d *codec1978.Decoder) + func (x *ReadCloserWrapper) CodecEncodeSelf(e *codec1978.Encoder) + type Resources struct + CPU int + DiskMB int + IOPS int + MemoryMB int + ParsedReservedPorts []int + ReservedPorts string + func (r *Resources) Merge(b *Resources) *Resources + func (r *Resources) ParseReserved() error + type ServerConfig struct + AuthoritativeRegion string + BootstrapExpect int + DataDir string + DeploymentGCThreshold string + Enabled bool + EnabledSchedulers []string + EncryptKey string + EvalGCThreshold string + HeartbeatGrace time.Duration + JobGCThreshold string + MaxHeartbeatsPerSecond float64 + MinHeartbeatTTL time.Duration + NodeGCThreshold string + NumSchedulers int + ProtocolVersion int + RejoinAfterLeave bool + RetryInterval string + RetryJoin []string + RetryMaxAttempts int + StartJoin []string + func (a *ServerConfig) Merge(b *ServerConfig) *ServerConfig + func (s *ServerConfig) EncryptBytes() ([]byte, error) + type StreamFrame struct + Data []byte + File string + FileEvent string + Offset int64 + func (s *StreamFrame) Clear() + func (s *StreamFrame) IsCleared() bool + func (s *StreamFrame) IsHeartbeat() bool + func (x *StreamFrame) CodecDecodeSelf(d *codec1978.Decoder) + func (x *StreamFrame) CodecEncodeSelf(e *codec1978.Encoder) + type StreamFramer struct + func NewStreamFramer(out io.WriteCloser, plainTxt bool, heartbeatRate, batchWindow time.Duration, ...) *StreamFramer + func (s *StreamFramer) Destroy() + func (s *StreamFramer) Err() error + func (s *StreamFramer) ExitCh() <-chan struct{} + func (s *StreamFramer) Run() + func (s *StreamFramer) Send(file, fileEvent string, data []byte, offset int64) error + func (x *StreamFramer) CodecDecodeSelf(d *codec1978.Decoder) + func (x *StreamFramer) CodecEncodeSelf(e *codec1978.Encoder) + type SyslogWrapper struct + func (s *SyslogWrapper) Write(p []byte) (int, error) + type Telemetry struct + BackwardsCompatibleMetrics bool + 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 + CollectionInterval string + DataDogAddr string + DisableHostname bool + DisableTaggedMetrics bool + PrometheusMetrics bool + PublishAllocationMetrics bool + PublishNodeMetrics bool + StatsdAddr string + StatsiteAddr string + UseNodeName bool + func (a *Telemetry) Merge(b *Telemetry) *Telemetry + type TestAgent struct + Config *Config + ConfigCallback func(*Config) + DataDir string + Key string + LogOutput io.Writer + Name string + RootToken *structs.ACLToken + Server *HTTPServer + T testing.T + func NewTestAgent(t testing.T, name string, configCallback func(*Config)) *TestAgent + func (a *TestAgent) Client() *api.Client + func (a *TestAgent) HTTPAddr() string + func (a *TestAgent) Shutdown() error + func (a *TestAgent) Start() *TestAgent + type UIAssetWrapper struct + FileSystem *assetfs.AssetFS + func (fs *UIAssetWrapper) Open(name string) (http.File, error)