state

package
v0.9.3-bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2019 License: MPL-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

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
}

State captures the state of the allocation runner.

func (*State) ClearDeploymentStatus

func (s *State) ClearDeploymentStatus()

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 (*State) ClientTerminalStatus

func (a *State) ClientTerminalStatus() bool

ClientTerminalStatus returns if the client status is terminal and will no longer transition

func (*State) Copy

func (s *State) Copy() *State

Copy returns a deep copy of State.

func (*State) SetDeploymentStatus

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL