Versions in this module Expand all Collapse all v0 v0.8.3 Apr 27, 2018 Changes in this version + const DefaultNamespace + const JobTypeBatch + const JobTypeService + const NodeEventSubsystemCluster + const NodeEventSubsystemDrain + const NodeEventSubsystemDriver + const NodeEventSubsystemHeartbeat + const OriginEnd + const OriginStart + const PeriodicSpecCron + const RegisterEnforceIndexErrPrefix + const TaskArtifactDownloadFailed + const TaskBuildingTaskDir + const TaskDownloadingArtifacts + const TaskDriverFailure + const TaskDriverMessage + const TaskFailedValidation + const TaskKilled + const TaskKilling + const TaskLeaderDead + const TaskNotRestarting + const TaskReceived + const TaskRestartSignal + const TaskRestarting + const TaskSetup + const TaskSetupFailure + const TaskSiblingFailed + const TaskSignaling + const TaskStarted + const TaskTerminated + var ClientConnTimeout = 1 * time.Second + var NodeDownErr = fmt.Errorf("node down") + type ACLPolicies struct + func (a *ACLPolicies) Delete(policyName string, q *WriteOptions) (*WriteMeta, error) + func (a *ACLPolicies) Info(policyName string, q *QueryOptions) (*ACLPolicy, *QueryMeta, error) + func (a *ACLPolicies) List(q *QueryOptions) ([]*ACLPolicyListStub, *QueryMeta, error) + func (a *ACLPolicies) Upsert(policy *ACLPolicy, q *WriteOptions) (*WriteMeta, error) + type ACLPolicy struct + CreateIndex uint64 + Description string + ModifyIndex uint64 + Name string + Rules string + type ACLPolicyListStub struct + CreateIndex uint64 + Description string + ModifyIndex uint64 + Name string + type ACLToken struct + AccessorID string + CreateIndex uint64 + CreateTime time.Time + Global bool + ModifyIndex uint64 + Name string + Policies []string + SecretID string + Type string + type ACLTokenListStub struct + AccessorID string + CreateIndex uint64 + CreateTime time.Time + Global bool + ModifyIndex uint64 + Name string + Policies []string + Type string + type ACLTokens struct + func (a *ACLTokens) Bootstrap(q *WriteOptions) (*ACLToken, *WriteMeta, error) + func (a *ACLTokens) Create(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) + func (a *ACLTokens) Delete(accessorID string, q *WriteOptions) (*WriteMeta, error) + func (a *ACLTokens) Info(accessorID string, q *QueryOptions) (*ACLToken, *QueryMeta, error) + func (a *ACLTokens) List(q *QueryOptions) ([]*ACLTokenListStub, *QueryMeta, error) + func (a *ACLTokens) Self(q *QueryOptions) (*ACLToken, *QueryMeta, error) + func (a *ACLTokens) Update(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) + type Agent struct + func (a *Agent) Datacenter() (string, error) + func (a *Agent) ForceLeave(node string) error + func (a *Agent) Health() (*AgentHealthResponse, error) + func (a *Agent) InstallKey(key string) (*KeyringResponse, error) + func (a *Agent) Join(addrs ...string) (int, error) + func (a *Agent) ListKeys() (*KeyringResponse, error) + func (a *Agent) Members() (*ServerMembers, error) + func (a *Agent) NodeName() (string, error) + func (a *Agent) Region() (string, error) + func (a *Agent) RemoveKey(key string) (*KeyringResponse, error) + func (a *Agent) Self() (*AgentSelf, error) + func (a *Agent) Servers() ([]string, error) + func (a *Agent) SetServers(addrs []string) error + func (a *Agent) UseKey(key string) (*KeyringResponse, error) + type AgentHealth struct + Message string + Ok bool + type AgentHealthResponse struct + Client *AgentHealth + Server *AgentHealth + type AgentMember struct + Addr string + DelegateCur uint8 + DelegateMax uint8 + DelegateMin uint8 + Name string + Port uint16 + ProtocolCur uint8 + ProtocolMax uint8 + ProtocolMin uint8 + Status string + Tags map[string]string + type AgentMembersNameSort []*AgentMember + func (a AgentMembersNameSort) Len() int + func (a AgentMembersNameSort) Less(i, j int) bool + func (a AgentMembersNameSort) Swap(i, j int) + type AgentSelf struct + Config map[string]interface{} + Member AgentMember + Stats map[string]map[string]string + type AllocDeploymentStatus struct + Healthy *bool + ModifyIndex uint64 + type AllocFS struct + func (a *AllocFS) Cat(alloc *Allocation, path string, q *QueryOptions) (io.ReadCloser, error) + func (a *AllocFS) List(alloc *Allocation, path string, q *QueryOptions) ([]*AllocFileInfo, *QueryMeta, error) + func (a *AllocFS) Logs(alloc *Allocation, follow bool, task, logType, origin string, offset int64, ...) (<-chan *StreamFrame, <-chan error) + func (a *AllocFS) ReadAt(alloc *Allocation, path string, offset int64, limit int64, q *QueryOptions) (io.ReadCloser, error) + func (a *AllocFS) Stat(alloc *Allocation, path string, q *QueryOptions) (*AllocFileInfo, *QueryMeta, error) + func (a *AllocFS) Stream(alloc *Allocation, path, origin string, offset int64, cancel <-chan struct{}, ...) (<-chan *StreamFrame, <-chan error) + type AllocFileInfo struct + FileMode string + IsDir bool + ModTime time.Time + Name string + Size int64 + type AllocIndexSort []*AllocationListStub + func (a AllocIndexSort) Len() int + func (a AllocIndexSort) Less(i, j int) bool + func (a AllocIndexSort) Swap(i, j int) + type AllocResourceUsage struct + ResourceUsage *ResourceUsage + Tasks map[string]*TaskResourceUsage + Timestamp int64 + type Allocation struct + AllocModifyIndex uint64 + ClientDescription string + ClientStatus string + CreateIndex uint64 + CreateTime int64 + DeploymentID string + DeploymentStatus *AllocDeploymentStatus + DesiredDescription string + DesiredStatus string + DesiredTransition DesiredTransition + EvalID string + FollowupEvalID string + ID string + Job *Job + JobID string + Metrics *AllocationMetric + ModifyIndex uint64 + ModifyTime int64 + Name string + Namespace string + NextAllocation string + NodeID string + PreviousAllocation string + RescheduleTracker *RescheduleTracker + Resources *Resources + Services map[string]string + TaskGroup string + TaskResources map[string]*Resources + TaskStates map[string]*TaskState + func (a Allocation) RescheduleInfo(t time.Time) (int, int) + type AllocationListStub struct + ClientDescription string + ClientStatus string + CreateIndex uint64 + CreateTime int64 + DeploymentStatus *AllocDeploymentStatus + DesiredDescription string + DesiredStatus string + EvalID string + FollowupEvalID string + ID string + JobID string + JobVersion uint64 + ModifyIndex uint64 + ModifyTime int64 + Name string + NodeID string + RescheduleTracker *RescheduleTracker + TaskGroup string + TaskStates map[string]*TaskState + type AllocationMetric struct + AllocationTime time.Duration + ClassExhausted map[string]int + ClassFiltered map[string]int + CoalescedFailures int + ConstraintFiltered map[string]int + DimensionExhausted map[string]int + NodesAvailable map[string]int + NodesEvaluated int + NodesExhausted int + NodesFiltered int + QuotaExhausted []string + Scores map[string]float64 + type AllocationSort []*Allocation + func (a AllocationSort) Len() int + func (a AllocationSort) Less(i, j int) bool + func (a AllocationSort) Swap(i, j int) + type Allocations struct + func (a *Allocations) GC(alloc *Allocation, q *QueryOptions) error + func (a *Allocations) Info(allocID string, q *QueryOptions) (*Allocation, *QueryMeta, error) + func (a *Allocations) List(q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) + func (a *Allocations) PrefixList(prefix string) ([]*AllocationListStub, *QueryMeta, error) + func (a *Allocations) Stats(alloc *Allocation, q *QueryOptions) (*AllocResourceUsage, error) + type AutopilotConfiguration struct + CleanupDeadServers bool + CreateIndex uint64 + DisableUpgradeMigration bool + EnableCustomUpgrades bool + EnableRedundancyZones bool + LastContactThreshold time.Duration + MaxTrailingLogs uint64 + ModifyIndex uint64 + ServerStabilizationTime time.Duration + func (u *AutopilotConfiguration) MarshalJSON() ([]byte, error) + func (u *AutopilotConfiguration) UnmarshalJSON(data []byte) error + type CheckRestart struct + Grace *time.Duration + IgnoreWarnings bool + Limit int + func (c *CheckRestart) Canonicalize() + func (c *CheckRestart) Copy() *CheckRestart + func (c *CheckRestart) Merge(o *CheckRestart) *CheckRestart + type Client struct + func NewClient(config *Config) (*Client, error) + func (c *Client) ACLPolicies() *ACLPolicies + func (c *Client) ACLTokens() *ACLTokens + func (c *Client) Address() string + func (c *Client) Agent() *Agent + func (c *Client) AllocFS() *AllocFS + func (c *Client) Allocations() *Allocations + func (c *Client) Deployments() *Deployments + func (c *Client) Evaluations() *Evaluations + func (c *Client) GetNodeClient(nodeID string, q *QueryOptions) (*Client, error) + func (c *Client) GetNodeClientWithTimeout(nodeID string, timeout time.Duration, q *QueryOptions) (*Client, error) + func (c *Client) Jobs() *Jobs + func (c *Client) Namespaces() *Namespaces + func (c *Client) Nodes() *Nodes + func (c *Client) Operator() *Operator + func (c *Client) Quotas() *Quotas + func (c *Client) Raw() *Raw + func (c *Client) Regions() *Regions + func (c *Client) Search() *Search + func (c *Client) SentinelPolicies() *SentinelPolicies + func (c *Client) SetNamespace(namespace string) + func (c *Client) SetRegion(region string) + func (c *Client) SetSecretID(secretID string) + func (c *Client) Status() *Status + func (c *Client) System() *System + type Config struct + Address string + HttpAuth *HttpBasicAuth + Namespace string + Region string + SecretID string + TLSConfig *TLSConfig + WaitTime time.Duration + func DefaultConfig() *Config + func (c *Config) ClientConfig(region, address string, tlsEnabled bool) *Config + func (c *Config) ConfigureTLS() error + func (c *Config) SetTimeout(t time.Duration) error + type Constraint struct + LTarget string + Operand string + RTarget string + func NewConstraint(left, operand, right string) *Constraint + type CpuStats struct + Measured []string + Percent float64 + SystemMode float64 + ThrottledPeriods uint64 + ThrottledTime uint64 + TotalTicks float64 + UserMode float64 + type Deployment struct + CreateIndex uint64 + ID string + JobCreateIndex uint64 + JobID string + JobModifyIndex uint64 + JobVersion uint64 + ModifyIndex uint64 + Namespace string + Status string + StatusDescription string + TaskGroups map[string]*DeploymentState + type DeploymentAllocHealthRequest struct + DeploymentID string + HealthyAllocationIDs []string + UnhealthyAllocationIDs []string + type DeploymentFailRequest struct + DeploymentID string + type DeploymentIndexSort []*Deployment + func (d DeploymentIndexSort) Len() int + func (d DeploymentIndexSort) Less(i, j int) bool + func (d DeploymentIndexSort) Swap(i, j int) + type DeploymentPauseRequest struct + DeploymentID string + Pause bool + type DeploymentPromoteRequest struct + All bool + DeploymentID string + Groups []string + type DeploymentSpecificRequest struct + DeploymentID string + type DeploymentState struct + AutoRevert bool + DesiredCanaries int + DesiredTotal int + HealthyAllocs int + PlacedAllocs int + PlacedCanaries []string + Promoted bool + UnhealthyAllocs int + type DeploymentUpdateResponse struct + DeploymentModifyIndex uint64 + EvalCreateIndex uint64 + EvalID string + RevertedJobVersion *uint64 + type Deployments struct + func (d *Deployments) Allocations(deploymentID string, q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) + func (d *Deployments) Fail(deploymentID string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) + func (d *Deployments) Info(deploymentID string, q *QueryOptions) (*Deployment, *QueryMeta, error) + func (d *Deployments) List(q *QueryOptions) ([]*Deployment, *QueryMeta, error) + func (d *Deployments) Pause(deploymentID string, pause bool, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) + func (d *Deployments) PrefixList(prefix string) ([]*Deployment, *QueryMeta, error) + func (d *Deployments) PromoteAll(deploymentID string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) + func (d *Deployments) PromoteGroups(deploymentID string, groups []string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) + func (d *Deployments) SetAllocHealth(deploymentID string, healthy, unhealthy []string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) + type DesiredTransition struct + Migrate *bool + func (d DesiredTransition) ShouldMigrate() bool + type DesiredUpdates struct + Canary uint64 + DestructiveUpdate uint64 + Ignore uint64 + InPlaceUpdate uint64 + Migrate uint64 + Place uint64 + Stop uint64 + type DispatchPayloadConfig struct + File string + type DrainSpec struct + Deadline time.Duration + IgnoreSystemJobs bool + type DrainStrategy struct + ForceDeadline time.Time + func (d *DrainStrategy) Equal(o *DrainStrategy) bool + func (d *DrainStrategy) String() string + type DriverInfo struct + Attributes map[string]string + Detected bool + HealthDescription string + Healthy bool + UpdateTime time.Time + type EphemeralDisk struct + Migrate *bool + SizeMB *int + Sticky *bool + func DefaultEphemeralDisk() *EphemeralDisk + func (e *EphemeralDisk) Canonicalize() + type EvalIndexSort []*Evaluation + func (e EvalIndexSort) Len() int + func (e EvalIndexSort) Less(i, j int) bool + func (e EvalIndexSort) Swap(i, j int) + type Evaluation struct + AnnotatePlan bool + BlockedEval string + ClassEligibility map[string]bool + CreateIndex uint64 + DeploymentID string + EscapedComputedClass bool + FailedTGAllocs map[string]*AllocationMetric + ID string + JobID string + JobModifyIndex uint64 + ModifyIndex uint64 + Namespace string + NextEval string + NodeID string + NodeModifyIndex uint64 + PreviousEval string + Priority int + QueuedAllocations map[string]int + QuotaLimitReached string + SnapshotIndex uint64 + Status string + StatusDescription string + TriggeredBy string + Type string + Wait time.Duration + WaitUntil time.Time + type Evaluations struct + func (e *Evaluations) Allocations(evalID string, q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) + func (e *Evaluations) Info(evalID string, q *QueryOptions) (*Evaluation, *QueryMeta, error) + func (e *Evaluations) List(q *QueryOptions) ([]*Evaluation, *QueryMeta, error) + func (e *Evaluations) PrefixList(prefix string) ([]*Evaluation, *QueryMeta, error) + type FieldDiff struct + Annotations []string + Name string + New string + Old string + Type string + type FrameReader struct + func NewFrameReader(frames <-chan *StreamFrame, errCh <-chan error, cancelCh chan struct{}) *FrameReader + func (f *FrameReader) Close() error + func (f *FrameReader) Offset() int + func (f *FrameReader) Read(p []byte) (n int, err error) + func (f *FrameReader) SetUnblockTime(d time.Duration) + type HostCPUStats struct + CPU string + Idle float64 + System float64 + User float64 + type HostDiskStats struct + Available uint64 + Device string + InodesUsedPercent float64 + Mountpoint string + Size uint64 + Used uint64 + UsedPercent float64 + type HostMemoryStats struct + Available uint64 + Free uint64 + Total uint64 + Used uint64 + type HostStats struct + CPU []*HostCPUStats + CPUTicksConsumed float64 + DiskStats []*HostDiskStats + Memory *HostMemoryStats + Uptime uint64 + type HttpBasicAuth struct + Password string + Username string + type Job struct + AllAtOnce *bool + Constraints []*Constraint + CreateIndex *uint64 + Datacenters []string + ID *string + JobModifyIndex *uint64 + Meta map[string]string + Migrate *MigrateStrategy + ModifyIndex *uint64 + Name *string + Namespace *string + ParameterizedJob *ParameterizedJobConfig + ParentID *string + Payload []byte + Periodic *PeriodicConfig + Priority *int + Region *string + Reschedule *ReschedulePolicy + Stable *bool + Status *string + StatusDescription *string + Stop *bool + SubmitTime *int64 + TaskGroups []*TaskGroup + Type *string + Update *UpdateStrategy + VaultToken *string + Version *uint64 + func MockJob() *Job + func MockPeriodicJob() *Job + func NewBatchJob(id, name, region string, pri int) *Job + func NewServiceJob(id, name, region string, pri int) *Job + func (j *Job) AddDatacenter(dc string) *Job + func (j *Job) AddPeriodicConfig(cfg *PeriodicConfig) *Job + func (j *Job) AddTaskGroup(grp *TaskGroup) *Job + func (j *Job) Canonicalize() + func (j *Job) Constrain(c *Constraint) *Job + func (j *Job) IsParameterized() bool + func (j *Job) IsPeriodic() bool + func (j *Job) LookupTaskGroup(name string) *TaskGroup + func (j *Job) SetMeta(key, val string) *Job + type JobChildrenSummary struct + Dead int64 + Pending int64 + Running int64 + func (jc *JobChildrenSummary) Sum() int + type JobDeregisterResponse struct + EvalCreateIndex uint64 + EvalID string + JobModifyIndex uint64 + type JobDiff struct + Fields []*FieldDiff + ID string + Objects []*ObjectDiff + TaskGroups []*TaskGroupDiff + Type string + type JobDispatchRequest struct + JobID string + Meta map[string]string + Payload []byte + type JobDispatchResponse struct + DispatchedJobID string + EvalCreateIndex uint64 + EvalID string + JobCreateIndex uint64 + type JobIDSort []*JobListStub + func (j JobIDSort) Len() int + func (j JobIDSort) Less(a, b int) bool + func (j JobIDSort) Swap(a, b int) + type JobListStub struct + CreateIndex uint64 + ID string + JobModifyIndex uint64 + JobSummary *JobSummary + ModifyIndex uint64 + Name string + ParameterizedJob bool + ParentID string + Periodic bool + Priority int + Status string + StatusDescription string + Stop bool + SubmitTime int64 + Type string + type JobPlanRequest struct + Diff bool + Job *Job + PolicyOverride bool + type JobPlanResponse struct + Annotations *PlanAnnotations + CreatedEvals []*Evaluation + Diff *JobDiff + FailedTGAllocs map[string]*AllocationMetric + JobModifyIndex uint64 + NextPeriodicLaunch time.Time + Warnings string + type JobRegisterRequest struct + EnforceIndex bool + Job *Job + JobModifyIndex uint64 + PolicyOverride bool + type JobRegisterResponse struct + EvalCreateIndex uint64 + EvalID string + JobModifyIndex uint64 + Warnings string + type JobRevertRequest struct + EnforcePriorVersion *uint64 + JobID string + JobVersion uint64 + type JobStabilityRequest struct + JobID string + JobVersion uint64 + Stable bool + type JobStabilityResponse struct + JobModifyIndex uint64 + type JobSummary struct + Children *JobChildrenSummary + CreateIndex uint64 + JobID string + ModifyIndex uint64 + Namespace string + Summary map[string]TaskGroupSummary + type JobValidateRequest struct + Job *Job + type JobValidateResponse struct + DriverConfigValidated bool + Error string + ValidationErrors []string + Warnings string + type JobVersionsResponse struct + Diffs []*JobDiff + Versions []*Job + type Jobs struct + func (j *Jobs) Allocations(jobID string, allAllocs bool, q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) + func (j *Jobs) Deployments(jobID string, q *QueryOptions) ([]*Deployment, *QueryMeta, error) + func (j *Jobs) Deregister(jobID string, purge bool, q *WriteOptions) (string, *WriteMeta, error) + func (j *Jobs) Dispatch(jobID string, meta map[string]string, payload []byte, q *WriteOptions) (*JobDispatchResponse, *WriteMeta, error) + func (j *Jobs) EnforceRegister(job *Job, modifyIndex uint64, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) + func (j *Jobs) Evaluations(jobID string, q *QueryOptions) ([]*Evaluation, *QueryMeta, error) + func (j *Jobs) ForceEvaluate(jobID string, q *WriteOptions) (string, *WriteMeta, error) + func (j *Jobs) Info(jobID string, q *QueryOptions) (*Job, *QueryMeta, error) + func (j *Jobs) LatestDeployment(jobID string, q *QueryOptions) (*Deployment, *QueryMeta, error) + func (j *Jobs) List(q *QueryOptions) ([]*JobListStub, *QueryMeta, error) + func (j *Jobs) ParseHCL(jobHCL string, canonicalize bool) (*Job, error) + func (j *Jobs) PeriodicForce(jobID string, q *WriteOptions) (string, *WriteMeta, error) + func (j *Jobs) Plan(job *Job, diff bool, q *WriteOptions) (*JobPlanResponse, *WriteMeta, error) + func (j *Jobs) PlanOpts(job *Job, opts *PlanOptions, q *WriteOptions) (*JobPlanResponse, *WriteMeta, error) + func (j *Jobs) PrefixList(prefix string) ([]*JobListStub, *QueryMeta, error) + func (j *Jobs) Register(job *Job, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) + func (j *Jobs) RegisterOpts(job *Job, opts *RegisterOptions, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) + func (j *Jobs) Revert(jobID string, version uint64, enforcePriorVersion *uint64, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) + func (j *Jobs) Stable(jobID string, version uint64, stable bool, q *WriteOptions) (*JobStabilityResponse, *WriteMeta, error) + func (j *Jobs) Summary(jobID string, q *QueryOptions) (*JobSummary, *QueryMeta, error) + func (j *Jobs) Validate(job *Job, q *WriteOptions) (*JobValidateResponse, *WriteMeta, error) + func (j *Jobs) Versions(jobID string, diffs bool, q *QueryOptions) ([]*Job, []*JobDiff, *QueryMeta, error) + type JobsParseRequest struct + Canonicalize bool + JobHCL string + type KeyringRequest struct + Key string + type KeyringResponse struct + Keys map[string]int + Messages map[string]string + NumNodes int + type LogConfig struct + MaxFileSizeMB *int + MaxFiles *int + func DefaultLogConfig() *LogConfig + func (l *LogConfig) Canonicalize() + type MemoryStats struct + Cache uint64 + KernelMaxUsage uint64 + KernelUsage uint64 + MaxUsage uint64 + Measured []string + RSS uint64 + Swap uint64 + type MigrateStrategy struct + HealthCheck *string + HealthyDeadline *time.Duration + MaxParallel *int + MinHealthyTime *time.Duration + func DefaultMigrateStrategy() *MigrateStrategy + func (m *MigrateStrategy) Canonicalize() + func (m *MigrateStrategy) Copy() *MigrateStrategy + func (m *MigrateStrategy) Merge(o *MigrateStrategy) + type MonitorMessage struct + Level MonitorMsgLevel + Message string + func Messagef(lvl MonitorMsgLevel, msg string, args ...interface{}) *MonitorMessage + func (m *MonitorMessage) String() string + type MonitorMsgLevel int + const MonitorMsgLevelError + const MonitorMsgLevelInfo + const MonitorMsgLevelNormal + const MonitorMsgLevelWarn + type Namespace struct + CreateIndex uint64 + Description string + ModifyIndex uint64 + Name string + Quota string + type NamespaceIndexSort []*Namespace + func (n NamespaceIndexSort) Len() int + func (n NamespaceIndexSort) Less(i, j int) bool + func (n NamespaceIndexSort) Swap(i, j int) + type Namespaces struct + func (n *Namespaces) Delete(namespace string, q *WriteOptions) (*WriteMeta, error) + func (n *Namespaces) Info(name string, q *QueryOptions) (*Namespace, *QueryMeta, error) + func (n *Namespaces) List(q *QueryOptions) ([]*Namespace, *QueryMeta, error) + func (n *Namespaces) PrefixList(prefix string, q *QueryOptions) ([]*Namespace, *QueryMeta, error) + func (n *Namespaces) Register(namespace *Namespace, q *WriteOptions) (*WriteMeta, error) + type NetworkResource struct + CIDR string + Device string + DynamicPorts []Port + IP string + MBits *int + ReservedPorts []Port + func (n *NetworkResource) Canonicalize() + type Node struct + Attributes map[string]string + CreateIndex uint64 + Datacenter string + Drain bool + DrainStrategy *DrainStrategy + Drivers map[string]*DriverInfo + Events []*NodeEvent + HTTPAddr string + ID string + Links map[string]string + Meta map[string]string + ModifyIndex uint64 + Name string + NodeClass string + Reserved *Resources + Resources *Resources + SchedulingEligibility string + Status string + StatusDescription string + StatusUpdatedAt int64 + TLSEnabled bool + type NodeDrainUpdateResponse struct + EvalCreateIndex uint64 + EvalIDs []string + NodeModifyIndex uint64 + type NodeEligibilityUpdateResponse struct + EvalCreateIndex uint64 + EvalIDs []string + NodeModifyIndex uint64 + type NodeEvent struct + CreateIndex uint64 + Details map[string]string + Message string + Subsystem string + Timestamp time.Time + type NodeIndexSort []*NodeListStub + func (n NodeIndexSort) Len() int + func (n NodeIndexSort) Less(i, j int) bool + func (n NodeIndexSort) Swap(i, j int) + type NodeListStub struct + Address string + CreateIndex uint64 + Datacenter string + Drain bool + ID string + ModifyIndex uint64 + Name string + NodeClass string + SchedulingEligibility string + Status string + StatusDescription string + Version string + type NodeUpdateDrainRequest struct + DrainSpec *DrainSpec + MarkEligible bool + NodeID string + type NodeUpdateEligibilityRequest struct + Eligibility string + NodeID string + type Nodes struct + func (n *Nodes) Allocations(nodeID string, q *QueryOptions) ([]*Allocation, *QueryMeta, error) + func (n *Nodes) ForceEvaluate(nodeID string, q *WriteOptions) (string, *WriteMeta, error) + func (n *Nodes) GC(nodeID string, q *QueryOptions) error + func (n *Nodes) GcAlloc(allocID string, q *QueryOptions) error + func (n *Nodes) Info(nodeID string, q *QueryOptions) (*Node, *QueryMeta, error) + func (n *Nodes) List(q *QueryOptions) ([]*NodeListStub, *QueryMeta, error) + func (n *Nodes) MonitorDrain(ctx context.Context, nodeID string, index uint64, ignoreSys bool) <-chan *MonitorMessage + func (n *Nodes) PrefixList(prefix string) ([]*NodeListStub, *QueryMeta, error) + func (n *Nodes) Stats(nodeID string, q *QueryOptions) (*HostStats, error) + func (n *Nodes) ToggleEligibility(nodeID string, eligible bool, q *WriteOptions) (*NodeEligibilityUpdateResponse, error) + func (n *Nodes) UpdateDrain(nodeID string, spec *DrainSpec, markEligible bool, q *WriteOptions) (*NodeDrainUpdateResponse, error) + type ObjectDiff struct + Fields []*FieldDiff + Name string + Objects []*ObjectDiff + Type string + type Operator struct + func (op *Operator) AutopilotCASConfiguration(conf *AutopilotConfiguration, q *WriteOptions) (bool, *WriteMeta, error) + func (op *Operator) AutopilotGetConfiguration(q *QueryOptions) (*AutopilotConfiguration, *QueryMeta, error) + func (op *Operator) AutopilotServerHealth(q *QueryOptions) (*OperatorHealthReply, *QueryMeta, error) + func (op *Operator) AutopilotSetConfiguration(conf *AutopilotConfiguration, q *WriteOptions) (*WriteMeta, error) + func (op *Operator) RaftGetConfiguration(q *QueryOptions) (*RaftConfiguration, error) + func (op *Operator) RaftRemovePeerByAddress(address string, q *WriteOptions) error + func (op *Operator) RaftRemovePeerByID(id string, q *WriteOptions) error + type OperatorHealthReply struct + FailureTolerance int + Healthy bool + Servers []ServerHealth + type ParameterizedJobConfig struct + MetaOptional []string + MetaRequired []string + Payload string + type PeriodicConfig struct + Enabled *bool + ProhibitOverlap *bool + Spec *string + SpecType *string + TimeZone *string + func (p *PeriodicConfig) Canonicalize() + func (p *PeriodicConfig) GetLocation() (*time.Location, error) + func (p *PeriodicConfig) Next(fromTime time.Time) (time.Time, error) + type PlanAnnotations struct + DesiredTGUpdates map[string]*DesiredUpdates + type PlanOptions struct + Diff bool + PolicyOverride bool + type Port struct + Label string + Value int + type QueryMeta struct + KnownLeader bool + LastContact time.Duration + LastIndex uint64 + RequestTime time.Duration + type QueryOptions struct + AllowStale bool + AuthToken string + Namespace string + Params map[string]string + Prefix string + Region string + WaitIndex uint64 + WaitTime time.Duration + type QuotaLimit struct + Hash []byte + Region string + RegionLimit *Resources + type QuotaLimitSort []*QuotaLimit + func (q QuotaLimitSort) Len() int + func (q QuotaLimitSort) Less(i, j int) bool + func (q QuotaLimitSort) Swap(i, j int) + type QuotaSpec struct + CreateIndex uint64 + Description string + Limits []*QuotaLimit + ModifyIndex uint64 + Name string + type QuotaSpecIndexSort []*QuotaSpec + func (q QuotaSpecIndexSort) Len() int + func (q QuotaSpecIndexSort) Less(i, j int) bool + func (q QuotaSpecIndexSort) Swap(i, j int) + type QuotaUsage struct + CreateIndex uint64 + ModifyIndex uint64 + Name string + Used map[string]*QuotaLimit + type QuotaUsageIndexSort []*QuotaUsage + func (q QuotaUsageIndexSort) Len() int + func (q QuotaUsageIndexSort) Less(i, j int) bool + func (q QuotaUsageIndexSort) Swap(i, j int) + type Quotas struct + func (q *Quotas) Delete(quota string, qo *WriteOptions) (*WriteMeta, error) + func (q *Quotas) Info(name string, qo *QueryOptions) (*QuotaSpec, *QueryMeta, error) + func (q *Quotas) List(qo *QueryOptions) ([]*QuotaSpec, *QueryMeta, error) + func (q *Quotas) ListUsage(qo *QueryOptions) ([]*QuotaUsage, *QueryMeta, error) + func (q *Quotas) PrefixList(prefix string, qo *QueryOptions) ([]*QuotaSpec, *QueryMeta, error) + func (q *Quotas) PrefixListUsage(prefix string, qo *QueryOptions) ([]*QuotaUsage, *QueryMeta, error) + func (q *Quotas) Register(spec *QuotaSpec, qo *WriteOptions) (*WriteMeta, error) + func (q *Quotas) Usage(name string, qo *QueryOptions) (*QuotaUsage, *QueryMeta, error) + type RaftConfiguration struct + Index uint64 + Servers []*RaftServer + type RaftServer struct + Address string + ID string + Leader bool + Node string + RaftProtocol string + Voter bool + type Raw struct + func (raw *Raw) Delete(endpoint string, out interface{}, q *WriteOptions) (*WriteMeta, error) + func (raw *Raw) Query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) + func (raw *Raw) Response(endpoint string, q *QueryOptions) (io.ReadCloser, error) + func (raw *Raw) Write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) + type Regions struct + func (r *Regions) List() ([]string, error) + type RegisterJobRequest struct + EnforceIndex bool + Job *Job + JobModifyIndex uint64 + PolicyOverride bool + type RegisterOptions struct + EnforceIndex bool + ModifyIndex uint64 + PolicyOverride bool + type RescheduleEvent struct + PrevAllocID string + PrevNodeID string + RescheduleTime int64 + type ReschedulePolicy struct + Attempts *int + Delay *time.Duration + DelayFunction *string + Interval *time.Duration + MaxDelay *time.Duration + Unlimited *bool + func NewDefaultReschedulePolicy(jobType string) *ReschedulePolicy + func (p *ReschedulePolicy) String() string + func (r *ReschedulePolicy) Canonicalize(jobType string) + func (r *ReschedulePolicy) Copy() *ReschedulePolicy + func (r *ReschedulePolicy) Merge(rp *ReschedulePolicy) + type RescheduleTracker struct + Events []*RescheduleEvent + type ResourceUsage struct + CpuStats *CpuStats + MemoryStats *MemoryStats + type Resources struct + CPU *int + DiskMB *int + IOPS *int + MemoryMB *int + Networks []*NetworkResource + func DefaultResources() *Resources + func MinResources() *Resources + func (r *Resources) Canonicalize() + func (r *Resources) Merge(other *Resources) + type RestartPolicy struct + Attempts *int + Delay *time.Duration + Interval *time.Duration + Mode *string + func (r *RestartPolicy) Merge(rp *RestartPolicy) + type Search struct + func (s *Search) PrefixSearch(prefix string, context contexts.Context, q *QueryOptions) (*SearchResponse, *QueryMeta, error) + type SearchRequest struct + Context contexts.Context + Prefix string + type SearchResponse struct + Matches map[contexts.Context][]string + Truncations map[contexts.Context]bool + type SentinelPolicies struct + func (a *SentinelPolicies) Delete(policyName string, q *WriteOptions) (*WriteMeta, error) + func (a *SentinelPolicies) Info(policyName string, q *QueryOptions) (*SentinelPolicy, *QueryMeta, error) + func (a *SentinelPolicies) List(q *QueryOptions) ([]*SentinelPolicyListStub, *QueryMeta, error) + func (a *SentinelPolicies) Upsert(policy *SentinelPolicy, q *WriteOptions) (*WriteMeta, error) + type SentinelPolicy struct + CreateIndex uint64 + Description string + EnforcementLevel string + ModifyIndex uint64 + Name string + Policy string + Scope string + type SentinelPolicyListStub struct + CreateIndex uint64 + Description string + EnforcementLevel string + ModifyIndex uint64 + Name string + Scope string + type ServerHealth struct + Address string + Healthy bool + ID string + LastContact time.Duration + LastIndex uint64 + LastTerm uint64 + Leader bool + Name string + SerfStatus string + StableSince time.Time + Version string + Voter bool + func (u *ServerHealth) MarshalJSON() ([]byte, error) + func (u *ServerHealth) UnmarshalJSON(data []byte) error + type ServerMembers struct + Members []*AgentMember + ServerDC string + ServerName string + ServerRegion string + type Service struct + AddressMode string + CheckRestart *CheckRestart + Checks []ServiceCheck + Id string + Name string + PortLabel string + Tags []string + func (s *Service) Canonicalize(t *Task, tg *TaskGroup, job *Job) + type ServiceCheck struct + AddressMode string + Args []string + CheckRestart *CheckRestart + Command string + Header map[string][]string + Id string + InitialStatus string + Interval time.Duration + Method string + Name string + Path string + PortLabel string + Protocol string + TLSSkipVerify bool + Timeout time.Duration + Type string + type SingleDeploymentResponse struct + Deployment *Deployment + type Status struct + func (s *Status) Leader() (string, error) + func (s *Status) Peers() ([]string, error) + func (s *Status) RegionLeader(region string) (string, error) + type StreamFrame struct + Data []byte + File string + FileEvent string + Offset int64 + func (s *StreamFrame) IsHeartbeat() bool + type System struct + func (s *System) GarbageCollect() error + func (s *System) ReconcileSummaries() error + type TLSConfig struct + CACert string + CAPath string + ClientCert string + ClientKey string + Insecure bool + TLSServerName string + func (t *TLSConfig) Copy() *TLSConfig + type Task struct + Artifacts []*TaskArtifact + Config map[string]interface{} + Constraints []*Constraint + DispatchPayload *DispatchPayloadConfig + Driver string + Env map[string]string + KillSignal string + KillTimeout *time.Duration + Leader bool + LogConfig *LogConfig + Meta map[string]string + Name string + Resources *Resources + Services []*Service + ShutdownDelay time.Duration + Templates []*Template + User string + Vault *Vault + func NewTask(name, driver string) *Task + func (t *Task) Canonicalize(tg *TaskGroup, job *Job) + func (t *Task) Constrain(c *Constraint) *Task + func (t *Task) Require(r *Resources) *Task + func (t *Task) SetConfig(key string, val interface{}) *Task + func (t *Task) SetLogConfig(l *LogConfig) *Task + func (t *Task) SetMeta(key, val string) *Task + type TaskArtifact struct + GetterMode *string + GetterOptions map[string]string + GetterSource *string + RelativeDest *string + func (a *TaskArtifact) Canonicalize() + type TaskDiff struct + Annotations []string + Fields []*FieldDiff + Name string + Objects []*ObjectDiff + Type string + type TaskEvent struct + Details map[string]string + DiskLimit int64 + DiskSize int64 + DisplayMessage string + DownloadError string + DriverError string + DriverMessage string + ExitCode int + FailedSibling string + FailsTask bool + GenericSource string + KillError string + KillReason string + KillTimeout time.Duration + Message string + RestartReason string + SetupError string + Signal int + StartDelay int64 + TaskSignal string + TaskSignalReason string + Time int64 + Type string + ValidationError string + VaultError string + type TaskGroup struct + Constraints []*Constraint + Count *int + EphemeralDisk *EphemeralDisk + Meta map[string]string + Migrate *MigrateStrategy + Name *string + ReschedulePolicy *ReschedulePolicy + RestartPolicy *RestartPolicy + Tasks []*Task + Update *UpdateStrategy + func NewTaskGroup(name string, count int) *TaskGroup + func (g *TaskGroup) AddTask(t *Task) *TaskGroup + func (g *TaskGroup) Canonicalize(job *Job) + func (g *TaskGroup) Constrain(c *Constraint) *TaskGroup + func (g *TaskGroup) RequireDisk(disk *EphemeralDisk) *TaskGroup + func (g *TaskGroup) SetMeta(key, val string) *TaskGroup + type TaskGroupDiff struct + Fields []*FieldDiff + Name string + Objects []*ObjectDiff + Tasks []*TaskDiff + Type string + Updates map[string]uint64 + type TaskGroupSummary struct + Complete int + Failed int + Lost int + Queued int + Running int + Starting int + type TaskResourceUsage struct + Pids map[string]*ResourceUsage + ResourceUsage *ResourceUsage + Timestamp int64 + type TaskState struct + Events []*TaskEvent + Failed bool + FinishedAt time.Time + LastRestart time.Time + Restarts uint64 + StartedAt time.Time + State string + type Template struct + ChangeMode *string + ChangeSignal *string + DestPath *string + EmbeddedTmpl *string + Envvars *bool + LeftDelim *string + Perms *string + RightDelim *string + SourcePath *string + Splay *time.Duration + VaultGrace *time.Duration + func (tmpl *Template) Canonicalize() + type UpdateStrategy struct + AutoRevert *bool + Canary *int + HealthCheck *string + HealthyDeadline *time.Duration + MaxParallel *int + MinHealthyTime *time.Duration + Stagger *time.Duration + func DefaultUpdateStrategy() *UpdateStrategy + func (u *UpdateStrategy) Canonicalize() + func (u *UpdateStrategy) Copy() *UpdateStrategy + func (u *UpdateStrategy) Empty() bool + func (u *UpdateStrategy) Merge(o *UpdateStrategy) + type Vault struct + ChangeMode *string + ChangeSignal *string + Env *bool + Policies []string + func (v *Vault) Canonicalize() + type WriteMeta struct + LastIndex uint64 + RequestTime time.Duration + type WriteOptions struct + AuthToken string + Namespace string + Region string + type WriteRequest struct + Namespace string + Region string + SecretID string