Documentation
¶
Index ¶
- Constants
- Variables
- func BindExecutionWorker(ctx context.Context, ws world.WorldState, objKey string, ...) (bool, error)
- func ComputeExecutionOutputs(outputs []*forge_target.Output, execOutputVals []forge_value.ValueSlice) ([]*forge_value.Value, error)
- func CreateExecutionWithTarget(ctx context.Context, ws world.WorldState, sender peer.ID, objKey string, ...) (*bucket.ObjectRef, error)
- func NewExecutionBlock() block.Block
- func NewExecutionToWorkerQuad(executionObjKey, workerObjKey string) world.GraphQuad
- type Claim
- func (m *Claim) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Claim) CloneVT() *Claim
- func (this *Claim) EqualMessageVT(thatMsg any) bool
- func (this *Claim) EqualVT(that *Claim) bool
- func (x *Claim) GetClaimId() string
- func (x *Claim) GetEpoch() uint64
- func (x *Claim) GetLeaseExpiresAt() *timestamppb.Timestamp
- func (c *Claim) LeaseExpired(now time.Time) bool
- func (x *Claim) MarshalJSON() ([]byte, error)
- func (x *Claim) MarshalProtoJSON(s *json.MarshalState)
- func (x *Claim) MarshalProtoText() string
- func (m *Claim) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Claim) MarshalToVT(dAtA []byte) (int, error)
- func (m *Claim) MarshalVT() (dAtA []byte, err error)
- func (*Claim) ProtoMessage()
- func (x *Claim) Reset()
- func (m *Claim) SizeVT() (n int)
- func (x *Claim) String() string
- func (x *Claim) UnmarshalJSON(b []byte) error
- func (x *Claim) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Claim) UnmarshalVT(dAtA []byte) error
- func (c *Claim) Validate() error
- type Execution
- func FilterExecutionOutputs(execs []*Execution, allowFailed bool, minComplete int) ([]*Execution, [][]*forge_value.Value, error)
- func LookupExecution(ctx context.Context, ws world.WorldState, objKey string) (*Execution, world.ObjectState, error)
- func UnmarshalExecution(ctx context.Context, bcs *block.Cursor) (*Execution, error)
- func WaitExecutionComplete(ctx context.Context, le *logrus.Entry, ws world.WorldState, ...) (*Execution, error)
- func (e *Execution) ApplyBlockRef(id uint32, ptr *block.BlockRef) error
- func (e *Execution) ApplySubBlock(id uint32, next block.SubBlock) error
- func (e *Execution) CheckPeerID(id peer.ID) error
- func (m *Execution) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Execution) CloneVT() *Execution
- func (this *Execution) EqualMessageVT(thatMsg any) bool
- func (this *Execution) EqualVT(that *Execution) bool
- func (e *Execution) GetBlockRefCtor(id uint32) block.Ctor
- func (e *Execution) GetBlockRefs() (map[uint32]*block.BlockRef, error)
- func (x *Execution) GetClaim() *Claim
- func (x *Execution) GetExecutionState() State
- func (x *Execution) GetLogEntries() []*LogEntry
- func (x *Execution) GetPeerId() string
- func (x *Execution) GetPlacement() *worker.Placement
- func (x *Execution) GetResult() *value.Result
- func (e *Execution) GetSubBlockCtor(id uint32) block.SubBlockCtor
- func (e *Execution) GetSubBlocks() map[uint32]block.SubBlock
- func (x *Execution) GetTargetRef() *block.BlockRef
- func (x *Execution) GetTimestamp() *timestamppb.Timestamp
- func (x *Execution) GetValueSet() *target.ValueSet
- func (x *Execution) GetWaitingPluginId() string
- func (e *Execution) IsComplete() bool
- func (x *Execution) MarshalJSON() ([]byte, error)
- func (x *Execution) MarshalProtoJSON(s *json.MarshalState)
- func (x *Execution) MarshalProtoText() string
- func (m *Execution) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Execution) MarshalToVT(dAtA []byte) (int, error)
- func (m *Execution) MarshalVT() (dAtA []byte, err error)
- func (e *Execution) ParsePeerID() (peer.ID, error)
- func (*Execution) ProtoMessage()
- func (x *Execution) Reset()
- func (m *Execution) SizeVT() (n int)
- func (x *Execution) String() string
- func (*Execution) TypeID() string
- func (x *Execution) UnmarshalJSON(b []byte) error
- func (x *Execution) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Execution) UnmarshalVT(dAtA []byte) error
- func (e *Execution) Validate() error
- type LogEntry
- func (m *LogEntry) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *LogEntry) CloneVT() *LogEntry
- func (this *LogEntry) EqualMessageVT(thatMsg any) bool
- func (this *LogEntry) EqualVT(that *LogEntry) bool
- func (x *LogEntry) GetLevel() string
- func (x *LogEntry) GetMessage() string
- func (x *LogEntry) GetTimestamp() *timestamppb.Timestamp
- func (x *LogEntry) MarshalJSON() ([]byte, error)
- func (x *LogEntry) MarshalProtoJSON(s *json.MarshalState)
- func (x *LogEntry) MarshalProtoText() string
- func (m *LogEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *LogEntry) MarshalToVT(dAtA []byte) (int, error)
- func (m *LogEntry) MarshalVT() (dAtA []byte, err error)
- func (*LogEntry) ProtoMessage()
- func (x *LogEntry) Reset()
- func (m *LogEntry) SizeVT() (n int)
- func (x *LogEntry) String() string
- func (x *LogEntry) UnmarshalJSON(b []byte) error
- func (x *LogEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *LogEntry) UnmarshalVT(dAtA []byte) error
- type Spec
- func (s *Spec) ApplyBlockRef(id uint32, ptr *block.BlockRef) error
- func (s *Spec) ApplySubBlock(id uint32, next block.SubBlock) error
- func (s *Spec) AssignTarget(bcs *block.Cursor, tgt *forge_target.Target)
- func (m *Spec) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Spec) CloneVT() *Spec
- func (this *Spec) EqualMessageVT(thatMsg any) bool
- func (this *Spec) EqualVT(that *Spec) bool
- func (s *Spec) GetBlockRefCtor(id uint32) block.Ctor
- func (s *Spec) GetBlockRefs() (map[uint32]*block.BlockRef, error)
- func (x *Spec) GetPeerId() string
- func (s *Spec) GetSubBlockCtor(id uint32) block.SubBlockCtor
- func (s *Spec) GetSubBlocks() map[uint32]block.SubBlock
- func (x *Spec) GetTargetRef() *block.BlockRef
- func (x *Spec) GetValueSet() *target.ValueSet
- func (x *Spec) MarshalJSON() ([]byte, error)
- func (x *Spec) MarshalProtoJSON(s *json.MarshalState)
- func (x *Spec) MarshalProtoText() string
- func (m *Spec) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Spec) MarshalToVT(dAtA []byte) (int, error)
- func (m *Spec) MarshalVT() (dAtA []byte, err error)
- func (*Spec) ProtoMessage()
- func (x *Spec) Reset()
- func (m *Spec) SizeVT() (n int)
- func (x *Spec) String() string
- func (x *Spec) UnmarshalJSON(b []byte) error
- func (x *Spec) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Spec) UnmarshalVT(dAtA []byte) error
- type State
- func (s State) EnsureMatches(sts ...State) error
- func (x State) Enum() *State
- func (x State) MarshalJSON() ([]byte, error)
- func (x State) MarshalProtoJSON(s *json.MarshalState)
- func (x State) MarshalProtoText() string
- func (x State) MarshalText() ([]byte, error)
- func (x State) String() string
- func (x *State) UnmarshalJSON(b []byte) error
- func (x *State) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *State) UnmarshalText(b []byte) error
- func (s State) Validate(allowUnknown bool) error
Constants ¶
const ClaimClockSkew = 5 * time.Second
ClaimClockSkew is the allowance for peer clock difference and target drain. Claimants cancel their targets this long before the published lease expiry. Reclaim cannot overlap the previous target when the reclaimer's clock lead plus the target's cancellation drain time stays within this allowance.
const DefaultClaimLease = 5 * time.Minute
DefaultClaimLease is how long a claim stays live without renewal.
const ExecutionTypeID = "forge/execution"
ExecutionTypeID is the type ID of Execution.
const ( // PredExecutionToWorker links an Execution to its placement's Worker. PredExecutionToWorker = quad.IRI("forge/execution-worker") )
Variables ¶
var ( State_name = map[int32]string{ 0: "ExecutionState_UNKNOWN", 1: "ExecutionState_PENDING", 2: "ExecutionState_RUNNING", 3: "ExecutionState_COMPLETE", 4: "ExecutionState_CANCELING", } State_value = map[string]int32{ "ExecutionState_UNKNOWN": 0, "ExecutionState_PENDING": 1, "ExecutionState_RUNNING": 2, "ExecutionState_COMPLETE": 3, "ExecutionState_CANCELING": 4, } )
Enum value maps for State.
var ErrUnknownState = errors.New("unknown execution state")
ErrUnknownState is returned if the state was unknown.
var ExecutionTypes = []typeid.Type{ {ID: ExecutionTypeID, New: func() any { return new(Execution) }}, }
ExecutionTypes lists the typed messages of execution.proto.
Functions ¶
func BindExecutionWorker ¶
func BindExecutionWorker(ctx context.Context, ws world.WorldState, objKey string, placement *forge_worker.Placement) (bool, error)
BindExecutionWorker records the Worker taking custody of an unplaced Execution. It returns false when another Worker has custody or the Execution is complete. An empty placement peer selects the Execution peer for a Worker tracking all peers. The caller must hold a write transaction; the body and graph commit together.
func ComputeExecutionOutputs ¶
func ComputeExecutionOutputs( outputs []*forge_target.Output, execOutputVals []forge_value.ValueSlice, ) ([]*forge_value.Value, error)
ComputeExecutionOutputs computes the outputs shared by a set of executions. Every execution's outputs must be valid and equal; filter failed executions with FilterExecutionOutputs first. Returns nil for an empty set.
func CreateExecutionWithTarget ¶
func CreateExecutionWithTarget( ctx context.Context, ws world.WorldState, sender peer.ID, objKey string, execPeerID peer.ID, valueSet *forge_target.ValueSet, tgt *forge_target.Target, placement *forge_worker.Placement, ts *timestamp.Timestamp, ) (*bucket.ObjectRef, error)
CreateExecutionWithTarget creates a pending Execution object in the world.
Writes the Target to a block linked to by the Execution. execPeerID is the peer ID to assign to the Execution. Replacing the Execution replaces its placement and sole Worker edge; a nil placement removes the edge. The caller owns the World transaction.
func NewExecutionBlock ¶
NewExecutionBlock constructs a new Execution block.
func NewExecutionToWorkerQuad ¶
NewExecutionToWorkerQuad creates a quad linking an Execution to its Worker.
Types ¶
type Claim ¶ added in v0.57.0
type Claim struct {
// ClaimId is the opaque identifier of the controller instance.
ClaimId string `protobuf:"bytes,1,opt,name=claim_id,json=claimId,proto3" json:"claimId,omitempty"`
// Epoch is the monotonic fencing token for this claim.
Epoch uint64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
// LeaseExpiresAt is when the claim stops being live unless its holder renews
// it. Once it has passed, a peer that observed the expiry may reclaim the
// Execution, which advances the epoch and fences the previous holder.
LeaseExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lease_expires_at,json=leaseExpiresAt,proto3" json:"leaseExpiresAt,omitempty"`
// contains filtered or unexported fields
}
Claim fences side effects and write-back for one execution owner.
func (*Claim) CloneMessageVT ¶ added in v0.57.0
func (m *Claim) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Claim) EqualMessageVT ¶ added in v0.57.0
func (*Claim) GetClaimId ¶ added in v0.57.0
func (*Claim) GetLeaseExpiresAt ¶
func (x *Claim) GetLeaseExpiresAt() *timestamppb.Timestamp
func (*Claim) LeaseExpired ¶
LeaseExpired reports whether the claim lease has run out at now.
func (*Claim) MarshalJSON ¶ added in v0.57.0
MarshalJSON marshals the Claim to JSON.
func (*Claim) MarshalProtoJSON ¶ added in v0.57.0
func (x *Claim) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Claim message to JSON.
func (*Claim) MarshalProtoText ¶ added in v0.57.0
func (*Claim) MarshalToSizedBufferVT ¶ added in v0.57.0
func (*Claim) ProtoMessage ¶ added in v0.57.0
func (*Claim) ProtoMessage()
func (*Claim) UnmarshalJSON ¶ added in v0.57.0
UnmarshalJSON unmarshals the Claim from JSON.
func (*Claim) UnmarshalProtoJSON ¶ added in v0.57.0
func (x *Claim) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Claim message from JSON.
func (*Claim) UnmarshalVT ¶ added in v0.57.0
type Execution ¶
type Execution struct {
// ExecutionState is the current state of the execution.
ExecutionState State `protobuf:"varint,1,opt,name=execution_state,json=executionState,proto3" json:"executionState,omitempty"`
// PeerId is the identifier of the peer assigned to the execution.
// Can be empty.
PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// Timestamp is the time the parent object (usually Pass) was created.
// Used as a reference timestamp to make all ops deterministic.
// Must be set & is not updated.
Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// ValueSet is the set of inputs and outputs used in the execution.
// Outputs are updated while the execution is RUNNING or CANCELING.
ValueSet *target.ValueSet `protobuf:"bytes,4,opt,name=value_set,json=valueSet,proto3" json:"valueSet,omitempty"`
// TargetRef is the block ref to the Target block.
TargetRef *block.BlockRef `protobuf:"bytes,5,opt,name=target_ref,json=targetRef,proto3" json:"targetRef,omitempty"`
// Result is information about the outcome of a completed execution.
Result *value.Result `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"`
// LogEntries contains log output from the execution.
// Appended while the execution is RUNNING or CANCELING.
LogEntries []*LogEntry `protobuf:"bytes,7,rep,name=log_entries,json=logEntries,proto3" json:"logEntries,omitempty"`
// Claim identifies the controller instance authorized to run and write back.
Claim *Claim `protobuf:"bytes,8,opt,name=claim,proto3" json:"claim,omitempty"`
// WaitingPluginId names the plugin whose load currently blocks this
// Execution. It is empty once the plugin's client is available.
WaitingPluginId string `protobuf:"bytes,9,opt,name=waiting_plugin_id,json=waitingPluginId,proto3" json:"waitingPluginId,omitempty"`
// Placement is the immutable Worker and Device peer authorized for this Execution.
Placement *worker.Placement `protobuf:"bytes,10,opt,name=placement,proto3" json:"placement,omitempty"`
// contains filtered or unexported fields
}
World graph links:
- <parent> -> usually a Pass which created the Execution
func FilterExecutionOutputs ¶
func FilterExecutionOutputs(execs []*Execution, allowFailed bool, minComplete int) ([]*Execution, [][]*forge_value.Value, error)
FilterExecutionOutputs returns only valid outputs for completed executions. if allowFailed, skips any failed or invalid executions.
func LookupExecution ¶
func LookupExecution(ctx context.Context, ws world.WorldState, objKey string) (*Execution, world.ObjectState, error)
LookupExecution looks up an execution in the world.
func UnmarshalExecution ¶
UnmarshalExecution unmarshals an execution block from the cursor.
func WaitExecutionComplete ¶
func WaitExecutionComplete( ctx context.Context, le *logrus.Entry, ws world.WorldState, executionObjectKey string, ) (*Execution, error)
WaitExecutionComplete waits until the execution is in the COMPLETE state.
func (*Execution) ApplyBlockRef ¶
ApplyBlockRef applies a ref change with a field id. The reference may be nil if the child block is nil.
func (*Execution) ApplySubBlock ¶
ApplySubBlock applies a sub-block change with a field id.
func (*Execution) CheckPeerID ¶
CheckPeerID checks if the peer ID matches the Execution.
func (*Execution) CloneMessageVT ¶
func (m *Execution) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Execution) EqualMessageVT ¶
func (*Execution) GetBlockRefCtor ¶
GetBlockRefCtor returns the constructor for the block at the ref id. Return nil to indicate invalid ref ID or unknown.
func (*Execution) GetBlockRefs ¶
GetBlockRefs returns all block references by ID. Values may be nil. Pending cursor references are excluded.
func (*Execution) GetExecutionState ¶
func (*Execution) GetLogEntries ¶
func (*Execution) GetPlacement ¶
func (*Execution) GetSubBlockCtor ¶
func (e *Execution) GetSubBlockCtor(id uint32) block.SubBlockCtor
GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.
func (*Execution) GetSubBlocks ¶
GetSubBlocks returns all constructed sub-blocks by ID. Values may be nil.
func (*Execution) GetTargetRef ¶
func (*Execution) GetTimestamp ¶
func (x *Execution) GetTimestamp() *timestamppb.Timestamp
func (*Execution) GetValueSet ¶
func (*Execution) GetWaitingPluginId ¶
func (*Execution) IsComplete ¶
IsComplete checks if the execution is in the COMPLETE state.
func (*Execution) MarshalJSON ¶
MarshalJSON marshals the Execution to JSON.
func (*Execution) MarshalProtoJSON ¶
func (x *Execution) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Execution message to JSON.
func (*Execution) MarshalProtoText ¶
func (*Execution) MarshalToSizedBufferVT ¶
func (*Execution) ParsePeerID ¶
ParsePeerID parses the peer ID field. Returns an empty peer ID if not set.
func (*Execution) ProtoMessage ¶
func (*Execution) ProtoMessage()
func (*Execution) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Execution from JSON.
func (*Execution) UnmarshalProtoJSON ¶
func (x *Execution) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Execution message from JSON.
func (*Execution) UnmarshalVT ¶
type LogEntry ¶
type LogEntry struct {
// Timestamp is when the log entry was created.
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Level is the log level (e.g. "info", "warn", "error", "debug").
Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"`
// Message is the log message text.
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
LogEntry is a single log line from an execution.
func (*LogEntry) CloneMessageVT ¶
func (m *LogEntry) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*LogEntry) EqualMessageVT ¶
func (*LogEntry) GetMessage ¶
func (*LogEntry) GetTimestamp ¶
func (x *LogEntry) GetTimestamp() *timestamppb.Timestamp
func (*LogEntry) MarshalJSON ¶
MarshalJSON marshals the LogEntry to JSON.
func (*LogEntry) MarshalProtoJSON ¶
func (x *LogEntry) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the LogEntry message to JSON.
func (*LogEntry) MarshalProtoText ¶
func (*LogEntry) MarshalToSizedBufferVT ¶
func (*LogEntry) ProtoMessage ¶
func (*LogEntry) ProtoMessage()
func (*LogEntry) UnmarshalJSON ¶
UnmarshalJSON unmarshals the LogEntry from JSON.
func (*LogEntry) UnmarshalProtoJSON ¶
func (x *LogEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the LogEntry message from JSON.
func (*LogEntry) UnmarshalVT ¶
type Spec ¶
type Spec struct {
// PeerId is the identifier of the peer assigned to the execution.
// Can be empty.
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// ValueSet is the set of inputs and outputs used in the execution.
// Specified output values are used as initial values, and can be overridden.
ValueSet *target.ValueSet `protobuf:"bytes,2,opt,name=value_set,json=valueSet,proto3" json:"valueSet,omitempty"`
// TargetRef is the target to run in the Execution.
// Overrides "target" field if set.
TargetRef *block.BlockRef `protobuf:"bytes,3,opt,name=target_ref,json=targetRef,proto3" json:"targetRef,omitempty"`
// contains filtered or unexported fields
}
Spec contains information specified when creating a Execution.
func (*Spec) ApplyBlockRef ¶
ApplyBlockRef applies a ref change with a field id.
func (*Spec) ApplySubBlock ¶
ApplySubBlock applies a sub-block change with a field id.
func (*Spec) AssignTarget ¶
func (s *Spec) AssignTarget(bcs *block.Cursor, tgt *forge_target.Target)
AssignTarget assigns a target to the spec with a block cursor. if tgt is nil clears the field
func (*Spec) CloneMessageVT ¶
func (m *Spec) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Spec) EqualMessageVT ¶
func (*Spec) GetBlockRefCtor ¶
GetBlockRefCtor returns the constructor for the block at the ref id.
func (*Spec) GetBlockRefs ¶
GetBlockRefs returns all block references by ID.
func (*Spec) GetSubBlockCtor ¶
func (s *Spec) GetSubBlockCtor(id uint32) block.SubBlockCtor
GetSubBlockCtor returns a function which creates or returns the existing sub-block at reference id. Can return nil to indicate invalid reference id.
func (*Spec) GetSubBlocks ¶
GetSubBlocks returns all constructed sub-blocks by ID. May return nil, and values may also be nil.
func (*Spec) GetTargetRef ¶
func (*Spec) GetValueSet ¶
func (*Spec) MarshalJSON ¶
MarshalJSON marshals the Spec to JSON.
func (*Spec) MarshalProtoJSON ¶
func (x *Spec) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Spec message to JSON.
func (*Spec) MarshalProtoText ¶
func (*Spec) MarshalToSizedBufferVT ¶
func (*Spec) ProtoMessage ¶
func (*Spec) ProtoMessage()
func (*Spec) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Spec from JSON.
func (*Spec) UnmarshalProtoJSON ¶
func (x *Spec) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Spec message from JSON.
func (*Spec) UnmarshalVT ¶
type State ¶
type State int32
State contains the possible execution states.
const ( // ExecutionState_UNKNOWN is the unknown type. State_ExecutionState_UNKNOWN State = 0 // ExecutionState_PENDING is the state before the execution starts. // Transitions to RUNNING when the assigned peer acks exec start. State_ExecutionState_PENDING State = 1 // ExecutionState_RUNNING is the state when the execution is running. State_ExecutionState_RUNNING State = 2 // ExecutionState_COMPLETE is the terminal state of the execution. // This includes both success and failure termination states. State_ExecutionState_COMPLETE State = 3 // ExecutionState_CANCELING is the state while the executor drains custody. State_ExecutionState_CANCELING State = 4 )
func (State) EnsureMatches ¶
EnsureMatches checks if the state matches or returns an error.
func (State) MarshalJSON ¶
MarshalJSON marshals the State to JSON.
func (State) MarshalProtoJSON ¶
func (x State) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the State to JSON.
func (State) MarshalProtoText ¶
func (State) MarshalText ¶
MarshalText marshals the State to text.
func (*State) UnmarshalJSON ¶
UnmarshalJSON unmarshals the State from JSON.
func (*State) UnmarshalProtoJSON ¶
func (x *State) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the State from JSON.
func (*State) UnmarshalText ¶
UnmarshalText unmarshals the State from text.