Documentation
¶
Index ¶
- Variables
- func LookupWorldOp(ctx context.Context, opTypeID string) (world.Operation, error)
- func ValidateExecSpecs(execSpecs []*ExecSpec) error
- type ExecSpec
- func (m *ExecSpec) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ExecSpec) CloneVT() *ExecSpec
- func (this *ExecSpec) EqualMessageVT(thatMsg any) bool
- func (this *ExecSpec) EqualVT(that *ExecSpec) bool
- func (x *ExecSpec) GetPeerId() string
- func (x *ExecSpec) MarshalJSON() ([]byte, error)
- func (x *ExecSpec) MarshalProtoJSON(s *json.MarshalState)
- func (x *ExecSpec) MarshalProtoText() string
- func (m *ExecSpec) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ExecSpec) MarshalToVT(dAtA []byte) (int, error)
- func (m *ExecSpec) MarshalVT() (dAtA []byte, err error)
- func (s *ExecSpec) ParsePeerID() (peer.ID, error)
- func (*ExecSpec) ProtoMessage()
- func (x *ExecSpec) Reset()
- func (m *ExecSpec) SizeVT() (n int)
- func (x *ExecSpec) String() string
- func (x *ExecSpec) UnmarshalJSON(b []byte) error
- func (x *ExecSpec) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ExecSpec) UnmarshalVT(dAtA []byte) error
- func (s *ExecSpec) Validate() error
- type Transaction
- type Tx
- func (t *Tx) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (t *Tx) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *Tx) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Tx) CloneVT() *Tx
- func (this *Tx) EqualMessageVT(thatMsg any) bool
- func (this *Tx) EqualVT(that *Tx) bool
- func (t *Tx) GetOperationTypeId() string
- func (x *Tx) GetPassObjectKey() string
- func (x *Tx) GetTxComplete() *TxComplete
- func (x *Tx) GetTxCreateExecSpecs() *TxCreateExecSpecs
- func (x *Tx) GetTxStart() *TxStart
- func (x *Tx) GetTxType() TxType
- func (x *Tx) GetTxUpdateExecStates() *TxUpdateExecStates
- func (t *Tx) LocateTx() (Transaction, error)
- func (t *Tx) MarshalBlock() ([]byte, error)
- func (x *Tx) MarshalJSON() ([]byte, error)
- func (x *Tx) MarshalProtoJSON(s *json.MarshalState)
- func (x *Tx) MarshalProtoText() string
- func (m *Tx) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Tx) MarshalToVT(dAtA []byte) (int, error)
- func (m *Tx) MarshalVT() (dAtA []byte, err error)
- func (*Tx) ProtoMessage()
- func (x *Tx) Reset()
- func (m *Tx) SizeVT() (n int)
- func (x *Tx) String() string
- func (t *Tx) UnmarshalBlock(data []byte) error
- func (x *Tx) UnmarshalJSON(b []byte) error
- func (x *Tx) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Tx) UnmarshalVT(dAtA []byte) error
- func (t *Tx) Validate() error
- type TxComplete
- func (m *TxComplete) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxComplete) CloneVT() *TxComplete
- func (this *TxComplete) EqualMessageVT(thatMsg any) bool
- func (this *TxComplete) EqualVT(that *TxComplete) bool
- func (t *TxComplete) ExecuteTx(ctx context.Context, worldState world.WorldState, sender peer.ID, ...) error
- func (x *TxComplete) GetResult() *value.Result
- func (t *TxComplete) GetTxType() TxType
- func (x *TxComplete) GetValueSet() *target.ValueSet
- func (x *TxComplete) MarshalJSON() ([]byte, error)
- func (x *TxComplete) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxComplete) MarshalProtoText() string
- func (m *TxComplete) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxComplete) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxComplete) MarshalVT() (dAtA []byte, err error)
- func (*TxComplete) ProtoMessage()
- func (x *TxComplete) Reset()
- func (m *TxComplete) SizeVT() (n int)
- func (x *TxComplete) String() string
- func (x *TxComplete) UnmarshalJSON(b []byte) error
- func (x *TxComplete) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxComplete) UnmarshalVT(dAtA []byte) error
- func (t *TxComplete) Validate() error
- type TxCreateExecSpecs
- func (m *TxCreateExecSpecs) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxCreateExecSpecs) CloneVT() *TxCreateExecSpecs
- func (this *TxCreateExecSpecs) EqualMessageVT(thatMsg any) bool
- func (this *TxCreateExecSpecs) EqualVT(that *TxCreateExecSpecs) bool
- func (t *TxCreateExecSpecs) ExecuteTx(ctx context.Context, worldState world.WorldState, sender peer.ID, ...) error
- func (x *TxCreateExecSpecs) GetClearExisting() bool
- func (x *TxCreateExecSpecs) GetExecSpecs() []*ExecSpec
- func (t *TxCreateExecSpecs) GetTxType() TxType
- func (t *TxCreateExecSpecs) IsEmpty() bool
- func (x *TxCreateExecSpecs) MarshalJSON() ([]byte, error)
- func (x *TxCreateExecSpecs) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxCreateExecSpecs) MarshalProtoText() string
- func (m *TxCreateExecSpecs) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxCreateExecSpecs) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxCreateExecSpecs) MarshalVT() (dAtA []byte, err error)
- func (*TxCreateExecSpecs) ProtoMessage()
- func (x *TxCreateExecSpecs) Reset()
- func (m *TxCreateExecSpecs) SizeVT() (n int)
- func (x *TxCreateExecSpecs) String() string
- func (x *TxCreateExecSpecs) UnmarshalJSON(b []byte) error
- func (x *TxCreateExecSpecs) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxCreateExecSpecs) UnmarshalVT(dAtA []byte) error
- func (t *TxCreateExecSpecs) Validate() error
- type TxStart
- func (m *TxStart) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxStart) CloneVT() *TxStart
- func (this *TxStart) EqualMessageVT(thatMsg any) bool
- func (this *TxStart) EqualVT(that *TxStart) bool
- func (t *TxStart) ExecuteTx(ctx context.Context, worldState world.WorldState, sender peer.ID, ...) error
- func (x *TxStart) GetCreateExecSpecs() *TxCreateExecSpecs
- func (t *TxStart) GetTxType() TxType
- func (x *TxStart) MarshalJSON() ([]byte, error)
- func (x *TxStart) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxStart) MarshalProtoText() string
- func (m *TxStart) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxStart) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxStart) MarshalVT() (dAtA []byte, err error)
- func (*TxStart) ProtoMessage()
- func (x *TxStart) Reset()
- func (m *TxStart) SizeVT() (n int)
- func (x *TxStart) String() string
- func (x *TxStart) UnmarshalJSON(b []byte) error
- func (x *TxStart) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxStart) UnmarshalVT(dAtA []byte) error
- func (t *TxStart) Validate() error
- type TxType
- func (x TxType) Enum() *TxType
- func (x TxType) MarshalJSON() ([]byte, error)
- func (x TxType) MarshalProtoJSON(s *json.MarshalState)
- func (x TxType) MarshalProtoText() string
- func (x TxType) MarshalText() ([]byte, error)
- func (x TxType) String() string
- func (x *TxType) UnmarshalJSON(b []byte) error
- func (x *TxType) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *TxType) UnmarshalText(b []byte) error
- func (t TxType) Validate() error
- type TxUpdateExecStates
- func (m *TxUpdateExecStates) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *TxUpdateExecStates) CloneVT() *TxUpdateExecStates
- func (this *TxUpdateExecStates) EqualMessageVT(thatMsg any) bool
- func (this *TxUpdateExecStates) EqualVT(that *TxUpdateExecStates) bool
- func (t *TxUpdateExecStates) ExecuteTx(ctx context.Context, worldState world.WorldState, sender peer.ID, ...) error
- func (t *TxUpdateExecStates) GetTxType() TxType
- func (x *TxUpdateExecStates) MarshalJSON() ([]byte, error)
- func (x *TxUpdateExecStates) MarshalProtoJSON(s *json.MarshalState)
- func (x *TxUpdateExecStates) MarshalProtoText() string
- func (m *TxUpdateExecStates) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *TxUpdateExecStates) MarshalToVT(dAtA []byte) (int, error)
- func (m *TxUpdateExecStates) MarshalVT() (dAtA []byte, err error)
- func (*TxUpdateExecStates) ProtoMessage()
- func (x *TxUpdateExecStates) Reset()
- func (m *TxUpdateExecStates) SizeVT() (n int)
- func (x *TxUpdateExecStates) String() string
- func (x *TxUpdateExecStates) UnmarshalJSON(b []byte) error
- func (x *TxUpdateExecStates) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *TxUpdateExecStates) UnmarshalVT(dAtA []byte) error
- func (t *TxUpdateExecStates) Validate() error
Constants ¶
This section is empty.
Variables ¶
var ( TxType_name = map[int32]string{ 0: "TxType_INVALID", 1: "TxType_START", 2: "TxType_CREATE_EXEC_SPECS", 3: "TxType_UPDATE_EXEC_STATES", 4: "TxType_COMPLETE", } TxType_value = map[string]int32{ "TxType_INVALID": 0, "TxType_START": 1, "TxType_CREATE_EXEC_SPECS": 2, "TxType_UPDATE_EXEC_STATES": 3, "TxType_COMPLETE": 4, } )
Enum value maps for TxType.
var WorldOperationTypeID = "forge/pass/tx"
WorldOperationTypeID is the transaction object operation type id. Corresponds to a single *TransactionData object.
Functions ¶
func LookupWorldOp ¶
LookupWorldOp performs the lookup operation for the pass op types.
func ValidateExecSpecs ¶
ValidateExecSpecs validates an exec spec set.
Types ¶
type ExecSpec ¶
type ExecSpec struct {
// PeerId is the identifier of the peer assigned to the execution.
// Cannot be empty.
PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// contains filtered or unexported fields
}
ExecSpec contains a specification for creating an Execution.
func (*ExecSpec) CloneMessageVT ¶
func (m *ExecSpec) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ExecSpec) EqualMessageVT ¶
func (*ExecSpec) MarshalJSON ¶
MarshalJSON marshals the ExecSpec to JSON.
func (*ExecSpec) MarshalProtoJSON ¶
func (x *ExecSpec) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ExecSpec message to JSON.
func (*ExecSpec) MarshalProtoText ¶
func (*ExecSpec) MarshalToSizedBufferVT ¶
func (*ExecSpec) ParsePeerID ¶
ParsePeerID parses the peer ID field.
func (*ExecSpec) ProtoMessage ¶
func (*ExecSpec) ProtoMessage()
func (*ExecSpec) UnmarshalJSON ¶
UnmarshalJSON unmarshals the ExecSpec from JSON.
func (*ExecSpec) UnmarshalProtoJSON ¶
func (x *ExecSpec) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ExecSpec message from JSON.
func (*ExecSpec) UnmarshalVT ¶
type Transaction ¶
type Transaction interface {
// MarshalVT marshals to binary.
MarshalVT() ([]byte, error)
// UnmarshalVT unmarshals from binary.
UnmarshalVT(data []byte) error
// GetTxType returns the type of transaction this is.
GetTxType() TxType
// Validate performs a cursory check of the transaction.
// Note: this should not fetch network data.
Validate() error
// ExecuteTx executes the transaction against the pass instance.
// bcs is located at the pass state root.
// note: bcs is sometimes not set, check to be sure.
// The result is written into bcs.
ExecuteTx(
ctx context.Context,
worldState world.WorldState,
sender peer.ID,
objKey string,
bcs *block.Cursor,
root *forge_pass.Pass,
) error
}
Transaction is an instance of a transaction object.
func NewTxCompleteTxn ¶
func NewTxCompleteTxn() Transaction
NewTxCompleteTxn constructs the COMPLETE transaction.
func NewTxCreateExecSpecsTxn ¶
func NewTxCreateExecSpecsTxn() Transaction
NewTxCreateExecSpecsTxn constructs a new CREATE_EXEC_SPECS transaction.
func NewTxStartTxn ¶
func NewTxStartTxn() Transaction
NewTxStartTxn constructs a new START transaction.
func NewTxUpdateExecStatesTxn ¶
func NewTxUpdateExecStatesTxn() Transaction
NewTxUpdateExecStatesTxn constructs a new UPDATE_EXEC_STATES transaction.
type Tx ¶
type Tx struct {
// TxType is the kind of transaction this is.
TxType TxType `protobuf:"varint,1,opt,name=tx_type,json=txType,proto3" json:"txType,omitempty"`
// PassObjectKey is the Pass object ID this is associated with.
// The Pass object must already exist.
PassObjectKey string `protobuf:"bytes,2,opt,name=pass_object_key,json=passObjectKey,proto3" json:"passObjectKey,omitempty"`
// TxStart contains the start transaction tx.
// TxType_START
TxStart *TxStart `protobuf:"bytes,3,opt,name=tx_start,json=txStart,proto3" json:"txStart,omitempty"`
// TxCreateExecSpecs contains the create exec specs tx.
// TxType_CREATE_EXEC_SPECS
TxCreateExecSpecs *TxCreateExecSpecs `protobuf:"bytes,4,opt,name=tx_create_exec_specs,json=txCreateExecSpecs,proto3" json:"txCreateExecSpecs,omitempty"`
// TxUpdateExecStates contains the update exec states tx.
// TxType_EXEC_COMPLETE
TxUpdateExecStates *TxUpdateExecStates `protobuf:"bytes,5,opt,name=tx_update_exec_states,json=txUpdateExecStates,proto3" json:"txUpdateExecStates,omitempty"`
// TxComplete contains the complete tx.
// TxType_COMPLETE
TxComplete *TxComplete `protobuf:"bytes,6,opt,name=tx_complete,json=txComplete,proto3" json:"txComplete,omitempty"`
// contains filtered or unexported fields
}
Tx is the on-the-wire representation of a transaction.
func ByteSliceToTx ¶
ByteSliceToTx converts a byte slice block a Tx. If blk is nil, returns nil, nil If the blk is already parsed to a MockWorldOp, returns the MockWorldOp.
func NewTxComplete ¶
func NewTxComplete(objKey string, result *forge_value.Result) *Tx
NewTxComplete constructs the COMPLETE transaction.
func NewTxCreateExecSpecs ¶
NewTxCreateExecSpecs constructs a new CREATE_EXEC_SPECS transaction.
func NewTxStart ¶
NewTxStart constructs a new START transaction.
func NewTxUpdateExecStates ¶
NewTxUpdateExecStates constructs a new UPDATE_EXEC_STATES transaction.
func (*Tx) ApplyWorldObjectOp ¶
func (t *Tx) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, sender peer.ID) (sysErr bool, err error)
ApplyWorldObjectOp applies the operation to a world object handle.
func (*Tx) ApplyWorldOp ¶
func (t *Tx) ApplyWorldOp( ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, sender peer.ID, ) (sysErr bool, err error)
ApplyWorldOp applies the operation as a world operation.
func (*Tx) CloneMessageVT ¶
func (m *Tx) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Tx) EqualMessageVT ¶
func (*Tx) GetOperationTypeId ¶
GetOperationTypeId returns the operation type identifier.
func (*Tx) GetPassObjectKey ¶
func (*Tx) GetTxComplete ¶
func (x *Tx) GetTxComplete() *TxComplete
func (*Tx) GetTxCreateExecSpecs ¶
func (x *Tx) GetTxCreateExecSpecs() *TxCreateExecSpecs
func (*Tx) GetTxStart ¶
func (*Tx) GetTxUpdateExecStates ¶
func (x *Tx) GetTxUpdateExecStates() *TxUpdateExecStates
func (*Tx) LocateTx ¶
func (t *Tx) LocateTx() (Transaction, error)
LocateTx returns the sub-block for the transaction.
func (*Tx) MarshalBlock ¶
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*Tx) MarshalJSON ¶
MarshalJSON marshals the Tx to JSON.
func (*Tx) MarshalProtoJSON ¶
func (x *Tx) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Tx message to JSON.
func (*Tx) MarshalProtoText ¶
func (*Tx) ProtoMessage ¶
func (*Tx) ProtoMessage()
func (*Tx) UnmarshalBlock ¶
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*Tx) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Tx from JSON.
func (*Tx) UnmarshalProtoJSON ¶
func (x *Tx) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Tx message from JSON.
func (*Tx) UnmarshalVT ¶
type TxComplete ¶
type TxComplete struct {
// Result is information about the outcome of a completed pass.
Result *value.Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
// ValueSet is the set of outputs from the Pass.
// Inputs must be empty.
// Must match the outputs calculated from the Execution objects.
// Must be empty if the result is not success.
ValueSet *target.ValueSet `protobuf:"bytes,2,opt,name=value_set,json=valueSet,proto3" json:"valueSet,omitempty"`
// contains filtered or unexported fields
}
TxComplete completes the execution by setting the result. If failed, may transition from any state. If success, must be in the CHECKING state. If success, all Exections must be in COMPLETE state and not failed. TxType: TxType_COMPLETE
func (*TxComplete) CloneMessageVT ¶
func (m *TxComplete) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxComplete) CloneVT ¶
func (m *TxComplete) CloneVT() *TxComplete
func (*TxComplete) EqualMessageVT ¶
func (this *TxComplete) EqualMessageVT(thatMsg any) bool
func (*TxComplete) EqualVT ¶
func (this *TxComplete) EqualVT(that *TxComplete) bool
func (*TxComplete) ExecuteTx ¶
func (t *TxComplete) ExecuteTx( ctx context.Context, worldState world.WorldState, sender peer.ID, objKey string, bcs *block.Cursor, root *forge_pass.Pass, ) error
ExecuteTx executes the transaction against the pass instance.
func (*TxComplete) GetResult ¶
func (x *TxComplete) GetResult() *value.Result
func (*TxComplete) GetTxType ¶
func (t *TxComplete) GetTxType() TxType
GetTxType returns the type of transaction this is.
func (*TxComplete) GetValueSet ¶
func (x *TxComplete) GetValueSet() *target.ValueSet
func (*TxComplete) MarshalJSON ¶
func (x *TxComplete) MarshalJSON() ([]byte, error)
MarshalJSON marshals the TxComplete to JSON.
func (*TxComplete) MarshalProtoJSON ¶
func (x *TxComplete) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxComplete message to JSON.
func (*TxComplete) MarshalProtoText ¶
func (x *TxComplete) MarshalProtoText() string
func (*TxComplete) MarshalToSizedBufferVT ¶
func (m *TxComplete) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TxComplete) MarshalToVT ¶
func (m *TxComplete) MarshalToVT(dAtA []byte) (int, error)
func (*TxComplete) MarshalVT ¶
func (m *TxComplete) MarshalVT() (dAtA []byte, err error)
func (*TxComplete) ProtoMessage ¶
func (*TxComplete) ProtoMessage()
func (*TxComplete) Reset ¶
func (x *TxComplete) Reset()
func (*TxComplete) SizeVT ¶
func (m *TxComplete) SizeVT() (n int)
func (*TxComplete) String ¶
func (x *TxComplete) String() string
func (*TxComplete) UnmarshalJSON ¶
func (x *TxComplete) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the TxComplete from JSON.
func (*TxComplete) UnmarshalProtoJSON ¶
func (x *TxComplete) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxComplete message from JSON.
func (*TxComplete) UnmarshalVT ¶
func (m *TxComplete) UnmarshalVT(dAtA []byte) error
func (*TxComplete) Validate ¶
func (t *TxComplete) Validate() error
Validate performs a cursory check of the transaction. Note: this should not fetch network data.
type TxCreateExecSpecs ¶
type TxCreateExecSpecs struct {
// ExecSpecs contains specifications for execution objects to create.
ExecSpecs []*ExecSpec `protobuf:"bytes,1,rep,name=exec_specs,json=execSpecs,proto3" json:"execSpecs,omitempty"`
// ClearExisting deletes all already-existing associated exec states.
// If set and len(exec_specs) == 0, clears all execution instances.
ClearExisting bool `protobuf:"varint,2,opt,name=clear_existing,json=clearExisting,proto3" json:"clearExisting,omitempty"`
// contains filtered or unexported fields
}
TxCreateExecSpecs creates a set of Execution objects from the specs. Overwrites any already-existing executions with matching peer ids. TxType: TxType_CREATE_EXEC_SPECS
func (*TxCreateExecSpecs) CloneMessageVT ¶
func (m *TxCreateExecSpecs) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxCreateExecSpecs) CloneVT ¶
func (m *TxCreateExecSpecs) CloneVT() *TxCreateExecSpecs
func (*TxCreateExecSpecs) EqualMessageVT ¶
func (this *TxCreateExecSpecs) EqualMessageVT(thatMsg any) bool
func (*TxCreateExecSpecs) EqualVT ¶
func (this *TxCreateExecSpecs) EqualVT(that *TxCreateExecSpecs) bool
func (*TxCreateExecSpecs) ExecuteTx ¶
func (t *TxCreateExecSpecs) ExecuteTx( ctx context.Context, worldState world.WorldState, sender peer.ID, objKey string, bcs *block.Cursor, root *forge_pass.Pass, ) error
ExecuteTx executes the transaction against the pass instance.
func (*TxCreateExecSpecs) GetClearExisting ¶
func (x *TxCreateExecSpecs) GetClearExisting() bool
func (*TxCreateExecSpecs) GetExecSpecs ¶
func (x *TxCreateExecSpecs) GetExecSpecs() []*ExecSpec
func (*TxCreateExecSpecs) GetTxType ¶
func (t *TxCreateExecSpecs) GetTxType() TxType
GetTxType returns the type of transaction this is.
func (*TxCreateExecSpecs) IsEmpty ¶
func (t *TxCreateExecSpecs) IsEmpty() bool
IsEmpty checks if the transaction is empty.
func (*TxCreateExecSpecs) MarshalJSON ¶
func (x *TxCreateExecSpecs) MarshalJSON() ([]byte, error)
MarshalJSON marshals the TxCreateExecSpecs to JSON.
func (*TxCreateExecSpecs) MarshalProtoJSON ¶
func (x *TxCreateExecSpecs) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxCreateExecSpecs message to JSON.
func (*TxCreateExecSpecs) MarshalProtoText ¶
func (x *TxCreateExecSpecs) MarshalProtoText() string
func (*TxCreateExecSpecs) MarshalToSizedBufferVT ¶
func (m *TxCreateExecSpecs) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TxCreateExecSpecs) MarshalToVT ¶
func (m *TxCreateExecSpecs) MarshalToVT(dAtA []byte) (int, error)
func (*TxCreateExecSpecs) MarshalVT ¶
func (m *TxCreateExecSpecs) MarshalVT() (dAtA []byte, err error)
func (*TxCreateExecSpecs) ProtoMessage ¶
func (*TxCreateExecSpecs) ProtoMessage()
func (*TxCreateExecSpecs) Reset ¶
func (x *TxCreateExecSpecs) Reset()
func (*TxCreateExecSpecs) SizeVT ¶
func (m *TxCreateExecSpecs) SizeVT() (n int)
func (*TxCreateExecSpecs) String ¶
func (x *TxCreateExecSpecs) String() string
func (*TxCreateExecSpecs) UnmarshalJSON ¶
func (x *TxCreateExecSpecs) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the TxCreateExecSpecs from JSON.
func (*TxCreateExecSpecs) UnmarshalProtoJSON ¶
func (x *TxCreateExecSpecs) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxCreateExecSpecs message from JSON.
func (*TxCreateExecSpecs) UnmarshalVT ¶
func (m *TxCreateExecSpecs) UnmarshalVT(dAtA []byte) error
func (*TxCreateExecSpecs) Validate ¶
func (t *TxCreateExecSpecs) Validate() error
Validate performs a cursory check of the transaction. Note: this should not fetch network data.
type TxStart ¶
type TxStart struct {
// CreateExecSpecs is the nested create exec specs transaction.
CreateExecSpecs *TxCreateExecSpecs `protobuf:"bytes,1,opt,name=create_exec_specs,json=createExecSpecs,proto3" json:"createExecSpecs,omitempty"`
// contains filtered or unexported fields
}
TxStart starts the execution of the pass, optionally creating Executions.
Executes UpdateExecStates as a sub-transaction to scan for Execution objects. Executes CreateExecSpecs as a nested transaction to create initial state. TxType: TxType_START
func (*TxStart) CloneMessageVT ¶
func (m *TxStart) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxStart) EqualMessageVT ¶
func (*TxStart) ExecuteTx ¶
func (t *TxStart) ExecuteTx( ctx context.Context, worldState world.WorldState, sender peer.ID, objKey string, bcs *block.Cursor, root *forge_pass.Pass, ) error
ExecuteTx executes the transaction against the pass instance.
func (*TxStart) GetCreateExecSpecs ¶
func (x *TxStart) GetCreateExecSpecs() *TxCreateExecSpecs
func (*TxStart) MarshalJSON ¶
MarshalJSON marshals the TxStart to JSON.
func (*TxStart) MarshalProtoJSON ¶
func (x *TxStart) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxStart message to JSON.
func (*TxStart) MarshalProtoText ¶
func (*TxStart) MarshalToSizedBufferVT ¶
func (*TxStart) ProtoMessage ¶
func (*TxStart) ProtoMessage()
func (*TxStart) UnmarshalJSON ¶
UnmarshalJSON unmarshals the TxStart from JSON.
func (*TxStart) UnmarshalProtoJSON ¶
func (x *TxStart) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxStart message from JSON.
func (*TxStart) UnmarshalVT ¶
type TxType ¶
type TxType int32
TxType indicates the kind of transaction.
const ( TxType_TxType_INVALID TxType = 0 // TxType_START marks the pass as running. // Transitions to state RUNNING from PENDING. TxType_TxType_START TxType = 1 // TxType_CREATE_EXEC_SPECS creates execution objects with specs. // Overwrites any already-existing executions with matching peer ids. // Can optionally clear the list of executions before creating. // Used to add / reset execution instances. TxType_TxType_CREATE_EXEC_SPECS TxType = 2 // TxType_UPDATE_EXEC_STATES updates the execution states. // Searches for valid Execution objects linked to the Pass. // Updates the list with the found objects. // Transitions to CHECKING if terminal conditions are found. // If any assigned executions fail, the Pass will also fail. TxType_TxType_UPDATE_EXEC_STATES TxType = 3 // TxType_COMPLETE sets the result of the execution. // If failed, can transition from any state. // If success, must transition from CHECKING state. // If success, all Execution states must be Successful. TxType_TxType_COMPLETE TxType = 4 )
func (TxType) MarshalJSON ¶
MarshalJSON marshals the TxType to JSON.
func (TxType) MarshalProtoJSON ¶
func (x TxType) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxType to JSON.
func (TxType) MarshalProtoText ¶
func (TxType) MarshalText ¶
MarshalText marshals the TxType to text.
func (*TxType) UnmarshalJSON ¶
UnmarshalJSON unmarshals the TxType from JSON.
func (*TxType) UnmarshalProtoJSON ¶
func (x *TxType) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxType from JSON.
func (*TxType) UnmarshalText ¶
UnmarshalText unmarshals the TxType from text.
type TxUpdateExecStates ¶
type TxUpdateExecStates struct {
// contains filtered or unexported fields
}
TxUpdateExecStates updates the list of execution states for the Pass. Updates the list with objects found via graph quad lookup. Transitions to CHECKING if terminal conditions are found. If any assigned executions fail, the Pass will also fail. TxType: TxType_UPDATE_EXEC_STATES
func (*TxUpdateExecStates) CloneMessageVT ¶
func (m *TxUpdateExecStates) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*TxUpdateExecStates) CloneVT ¶
func (m *TxUpdateExecStates) CloneVT() *TxUpdateExecStates
func (*TxUpdateExecStates) EqualMessageVT ¶
func (this *TxUpdateExecStates) EqualMessageVT(thatMsg any) bool
func (*TxUpdateExecStates) EqualVT ¶
func (this *TxUpdateExecStates) EqualVT(that *TxUpdateExecStates) bool
func (*TxUpdateExecStates) ExecuteTx ¶
func (t *TxUpdateExecStates) ExecuteTx( ctx context.Context, worldState world.WorldState, sender peer.ID, objKey string, bcs *block.Cursor, root *forge_pass.Pass, ) error
ExecuteTx executes the transaction against the pass instance.
func (*TxUpdateExecStates) GetTxType ¶
func (t *TxUpdateExecStates) GetTxType() TxType
GetTxType returns the type of transaction this is.
func (*TxUpdateExecStates) MarshalJSON ¶
func (x *TxUpdateExecStates) MarshalJSON() ([]byte, error)
MarshalJSON marshals the TxUpdateExecStates to JSON.
func (*TxUpdateExecStates) MarshalProtoJSON ¶
func (x *TxUpdateExecStates) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the TxUpdateExecStates message to JSON.
func (*TxUpdateExecStates) MarshalProtoText ¶
func (x *TxUpdateExecStates) MarshalProtoText() string
func (*TxUpdateExecStates) MarshalToSizedBufferVT ¶
func (m *TxUpdateExecStates) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*TxUpdateExecStates) MarshalToVT ¶
func (m *TxUpdateExecStates) MarshalToVT(dAtA []byte) (int, error)
func (*TxUpdateExecStates) MarshalVT ¶
func (m *TxUpdateExecStates) MarshalVT() (dAtA []byte, err error)
func (*TxUpdateExecStates) ProtoMessage ¶
func (*TxUpdateExecStates) ProtoMessage()
func (*TxUpdateExecStates) Reset ¶
func (x *TxUpdateExecStates) Reset()
func (*TxUpdateExecStates) SizeVT ¶
func (m *TxUpdateExecStates) SizeVT() (n int)
func (*TxUpdateExecStates) String ¶
func (x *TxUpdateExecStates) String() string
func (*TxUpdateExecStates) UnmarshalJSON ¶
func (x *TxUpdateExecStates) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the TxUpdateExecStates from JSON.
func (*TxUpdateExecStates) UnmarshalProtoJSON ¶
func (x *TxUpdateExecStates) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the TxUpdateExecStates message from JSON.
func (*TxUpdateExecStates) UnmarshalVT ¶
func (m *TxUpdateExecStates) UnmarshalVT(dAtA []byte) error
func (*TxUpdateExecStates) Validate ¶
func (t *TxUpdateExecStates) Validate() error
Validate performs a cursory check of the transaction. Note: this should not fetch network data.