type State struct {
// ClientStatus captures the overall state of the allocation ClientStatus string// ClientDescription is an optional human readable description of the// allocations client state
ClientDescription string// DeploymentStatus captures the status of the deployment DeploymentStatus *structs.AllocDeploymentStatus// TaskStates is a snapshot of task states. TaskStates map[string]*structs.TaskState// NetworkStatus captures network details not known until runtime NetworkStatus *structs.AllocNetworkStatus
}
State captures the state of the allocation runner.
ClearDeploymentStatus is a helper to clear the client-controlled
DeploymentStatus fields: Healthy and Timestamp. The Canary and ModifyIndex
fields should only be updated by the server.
func (s *State) SetDeploymentStatus(timestamp time.Time, healthy bool)
SetDeploymentStatus is a helper for updating the client-controlled
DeploymentStatus fields: Healthy and Timestamp. The Canary and ModifyIndex
fields should only be updated by the server.