Versions in this module Expand all Collapse all v0 v0.1.2 Oct 6, 2015 v0.1.1 Oct 5, 2015 Changes in this version type Task + Env map[string]string v0.1.0 Sep 28, 2015 Changes in this version + const APIMajorVersion + const APIMinorVersion + const AllocClientStatusDead + const AllocClientStatusFailed + const AllocClientStatusPending + const AllocClientStatusRunning + const AllocDesiredStatusEvict + const AllocDesiredStatusFailed + const AllocDesiredStatusRun + const AllocDesiredStatusStop + const CoreJobEvalGC + const CoreJobNodeGC + const CoreJobPriority + const EvalStatusComplete + const EvalStatusFailed + const EvalStatusPending + const EvalTriggerJobDeregister + const EvalTriggerJobRegister + const EvalTriggerNodeUpdate + const EvalTriggerRollingUpdate + const EvalTriggerScheduled + const JobDefaultPriority + const JobMaxPriority + const JobMinPriority + const JobStatusComplete + const JobStatusDead + const JobStatusPending + const JobStatusRunning + const JobTypeBatch + const JobTypeCore + const JobTypeService + const MaxDynamicPort + const MinDynamicPort + const NodeStatusDown + const NodeStatusInit + const NodeStatusReady + const ProtocolVersion + var ErrNoLeader = fmt.Errorf("No cluster leader") + var ErrNoRegionPath = fmt.Errorf("No path to region") + func Decode(buf []byte, out interface{}) error + func Encode(t MessageType, msg interface{}) ([]byte, error) + func GenerateUUID() string + func IntContains(haystack []int, needle int) bool + func ScoreFit(node *Node, util *Resources) float64 + func ShouldDrainNode(status string) bool + func ValidNodeStatus(status string) bool + type AllocListRequest struct + type AllocListResponse struct + Allocations []*AllocListStub + type AllocListStub struct + ClientDescription string + ClientStatus string + CreateIndex uint64 + DesiredDescription string + DesiredStatus string + EvalID string + ID string + JobID string + ModifyIndex uint64 + Name string + NodeID string + TaskGroup string + type AllocMetric struct + AllocationTime time.Duration + ClassExhausted map[string]int + ClassFiltered map[string]int + CoalescedFailures int + ConstraintFiltered map[string]int + DimensionExhausted map[string]int + NodesEvaluated int + NodesExhausted int + NodesFiltered int + Scores map[string]float64 + func (a *AllocMetric) EvaluateNode() + func (a *AllocMetric) ExhaustedNode(node *Node, dimension string) + func (a *AllocMetric) FilterNode(node *Node, constraint string) + func (a *AllocMetric) ScoreNode(node *Node, name string, score float64) + type AllocSpecificRequest struct + AllocID string + type AllocUpdateRequest struct + Alloc []*Allocation + type Allocation struct + ClientDescription string + ClientStatus string + CreateIndex uint64 + DesiredDescription string + DesiredStatus string + EvalID string + ID string + Job *Job + JobID string + Metrics *AllocMetric + ModifyIndex uint64 + Name string + NodeID string + Resources *Resources + TaskGroup string + TaskResources map[string]*Resources + func FilterTerminalAllocs(allocs []*Allocation) []*Allocation + func RemoveAllocs(alloc []*Allocation, remove []*Allocation) []*Allocation + func (a *Allocation) Stub() *AllocListStub + func (a *Allocation) TerminalStatus() bool + type Constraint struct + Hard bool + LTarget string + Operand string + RTarget string + Weight int + func (c *Constraint) String() string + type EvalAckRequest struct + EvalID string + Token string + type EvalAllocationsResponse struct + Allocations []*AllocListStub + type EvalDeleteRequest struct + Allocs []string + Evals []string + type EvalDequeueRequest struct + Schedulers []string + Timeout time.Duration + type EvalDequeueResponse struct + Eval *Evaluation + Token string + type EvalListRequest struct + type EvalListResponse struct + Evaluations []*Evaluation + type EvalSpecificRequest struct + EvalID string + type EvalUpdateRequest struct + EvalToken string + Evals []*Evaluation + type Evaluation struct + CreateIndex uint64 + ID string + JobID string + JobModifyIndex uint64 + ModifyIndex uint64 + NextEval string + NodeID string + NodeModifyIndex uint64 + PreviousEval string + Priority int + Status string + StatusDescription string + TriggeredBy string + Type string + Wait time.Duration + func (e *Evaluation) Copy() *Evaluation + func (e *Evaluation) GoString() string + func (e *Evaluation) MakePlan(j *Job) *Plan + func (e *Evaluation) NextRollingEval(wait time.Duration) *Evaluation + func (e *Evaluation) ShouldEnqueue() bool + func (e *Evaluation) TerminalStatus() bool + type GenericRequest struct + type GenericResponse struct + type Job struct + AllAtOnce bool + Constraints []*Constraint + CreateIndex uint64 + Datacenters []string + ID string + Meta map[string]string + ModifyIndex uint64 + Name string + Priority int + Region string + Status string + StatusDescription string + TaskGroups []*TaskGroup + Type string + Update UpdateStrategy + func (j *Job) LookupTaskGroup(name string) *TaskGroup + func (j *Job) Stub() *JobListStub + func (j *Job) Validate() error + type JobAllocationsResponse struct + Allocations []*AllocListStub + type JobDeregisterRequest struct + JobID string + type JobDeregisterResponse struct + EvalCreateIndex uint64 + EvalID string + JobModifyIndex uint64 + type JobEvaluateRequest struct + JobID string + type JobEvaluationsResponse struct + Evaluations []*Evaluation + type JobListRequest struct + type JobListResponse struct + Jobs []*JobListStub + type JobListStub struct + CreateIndex uint64 + ID string + ModifyIndex uint64 + Name string + Priority int + Status string + StatusDescription string + Type string + type JobRegisterRequest struct + Job *Job + type JobRegisterResponse struct + EvalCreateIndex uint64 + EvalID string + JobModifyIndex uint64 + type JobSpecificRequest struct + JobID string + type MessageType uint8 + const AllocClientUpdateRequestType + const AllocUpdateRequestType + const EvalDeleteRequestType + const EvalUpdateRequestType + const IgnoreUnknownTypeFlag + const JobDeregisterRequestType + const JobRegisterRequestType + const NodeDeregisterRequestType + const NodeRegisterRequestType + const NodeUpdateDrainRequestType + const NodeUpdateStatusRequestType + type NetworkIndex struct + AvailBandwidth map[string]int + AvailNetworks []*NetworkResource + UsedBandwidth map[string]int + UsedPorts map[string]map[int]struct{} + func NewNetworkIndex() *NetworkIndex + func (idx *NetworkIndex) AddAllocs(allocs []*Allocation) (collide bool) + func (idx *NetworkIndex) AddReserved(n *NetworkResource) (collide bool) + func (idx *NetworkIndex) AssignNetwork(ask *NetworkResource) (out *NetworkResource, err error) + func (idx *NetworkIndex) Overcommitted() bool + func (idx *NetworkIndex) SetNode(node *Node) (collide bool) + type NetworkResource struct + CIDR string + Device string + DynamicPorts []string + IP string + MBits int + ReservedPorts []int + func (n *NetworkResource) Add(delta *NetworkResource) + func (n *NetworkResource) Copy() *NetworkResource + func (n *NetworkResource) GoString() string + func (n *NetworkResource) ListStaticPorts() []int + func (n *NetworkResource) MapDynamicPorts() map[string]int + type Node struct + Attributes map[string]string + CreateIndex uint64 + Datacenter string + Drain bool + ID string + Links map[string]string + Meta map[string]string + ModifyIndex uint64 + Name string + NodeClass string + Reserved *Resources + Resources *Resources + Status string + StatusDescription string + func (n *Node) Stub() *NodeListStub + func (n *Node) TerminalStatus() bool + type NodeAllocsResponse struct + Allocs []*Allocation + type NodeDeregisterRequest struct + NodeID string + type NodeDrainUpdateResponse struct + EvalCreateIndex uint64 + EvalIDs []string + NodeModifyIndex uint64 + type NodeEvaluateRequest struct + NodeID string + type NodeListRequest struct + type NodeListResponse struct + Nodes []*NodeListStub + type NodeListStub struct + CreateIndex uint64 + Datacenter string + Drain bool + ID string + ModifyIndex uint64 + Name string + NodeClass string + Status string + StatusDescription string + type NodeRegisterRequest struct + Node *Node + type NodeSpecificRequest struct + NodeID string + type NodeUpdateDrainRequest struct + Drain bool + NodeID string + type NodeUpdateResponse struct + EvalCreateIndex uint64 + EvalIDs []string + HeartbeatTTL time.Duration + NodeModifyIndex uint64 + type NodeUpdateStatusRequest struct + NodeID string + Status string + type Plan struct + AllAtOnce bool + EvalID string + EvalToken string + FailedAllocs []*Allocation + NodeAllocation map[string][]*Allocation + NodeUpdate map[string][]*Allocation + Priority int + func (p *Plan) AppendAlloc(alloc *Allocation) + func (p *Plan) AppendFailed(alloc *Allocation) + func (p *Plan) AppendUpdate(alloc *Allocation, status, desc string) + func (p *Plan) IsNoOp() bool + func (p *Plan) PopUpdate(alloc *Allocation) + type PlanRequest struct + Plan *Plan + type PlanResponse struct + Result *PlanResult + type PlanResult struct + AllocIndex uint64 + FailedAllocs []*Allocation + NodeAllocation map[string][]*Allocation + NodeUpdate map[string][]*Allocation + RefreshIndex uint64 + func (p *PlanResult) FullCommit(plan *Plan) (bool, int, int) + func (p *PlanResult) IsNoOp() bool + type QueryMeta struct + Index uint64 + KnownLeader bool + LastContact time.Duration + type QueryOptions struct + AllowStale bool + MaxQueryTime time.Duration + MinQueryIndex uint64 + Region string + func (q QueryOptions) AllowStaleRead() bool + func (q QueryOptions) IsRead() bool + func (q QueryOptions) RequestRegion() string + type RPCInfo interface + AllowStaleRead func() bool + IsRead func() bool + RequestRegion func() string + type Resources struct + CPU int + DiskMB int + IOPS int + MemoryMB int + Networks []*NetworkResource + func AllocsFit(node *Node, allocs []*Allocation, netIdx *NetworkIndex) (bool, string, *Resources, error) + func (r *Resources) Add(delta *Resources) error + func (r *Resources) Copy() *Resources + func (r *Resources) GoString() string + func (r *Resources) NetIndex(n *NetworkResource) int + func (r *Resources) Superset(other *Resources) (bool, string) + type SingleAllocResponse struct + Alloc *Allocation + type SingleEvalResponse struct + Eval *Evaluation + type SingleJobResponse struct + Job *Job + type SingleNodeResponse struct + Node *Node + type Task struct + Config map[string]string + Constraints []*Constraint + Driver string + Meta map[string]string + Name string + Resources *Resources + func (t *Task) GoString() string + func (t *Task) Validate() error + type TaskGroup struct + Constraints []*Constraint + Count int + Meta map[string]string + Name string + Tasks []*Task + func (tg *TaskGroup) GoString() string + func (tg *TaskGroup) LookupTask(name string) *Task + func (tg *TaskGroup) Validate() error + type UpdateStrategy struct + MaxParallel int + Stagger time.Duration + func (u *UpdateStrategy) Rolling() bool + type VersionResponse struct + Build string + Versions map[string]int + type WriteMeta struct + Index uint64 + type WriteRequest struct + Region string + func (w WriteRequest) AllowStaleRead() bool + func (w WriteRequest) IsRead() bool + func (w WriteRequest) RequestRegion() string