Documentation
¶
Index ¶
- Constants
- Variables
- func AssignClusterLeaderPeer(ctx context.Context, w world.WorldState, sender peer.ID, clusterKey string, ...) (uint64, bool, error)
- func AssignJobToCluster(ctx context.Context, w world.WorldState, clusterKey, jobKey string, ...) (uint64, bool, error)
- func AssignTaskToCluster(ctx context.Context, w world.WorldState, clusterKey, jobKey, taskKey string, ...) (uint64, bool, error)
- func AssignWorkerToCluster(ctx context.Context, w world.WorldState, clusterKey, workerKey string, ...) (uint64, bool, error)
- func CheckClusterHasJob(ctx context.Context, w world.WorldState, clusterKey, jobKey string) (bool, error)
- func CheckClusterType(ctx context.Context, ws world.WorldState, objKey string) error
- func CollectClusterJobs(ctx context.Context, ws world.WorldState, clusterKeys ...string) ([]*forge_job.Job, []string, error)
- func CollectClusterWorkers(ctx context.Context, ws world.WorldState, clusterKeys ...string) ([]*forge_worker.Worker, []string, error)
- func CompleteJob(ctx context.Context, w world.WorldState, clusterKey, jobKey string, ...) (uint64, bool, error)
- func CreateCluster(ctx context.Context, w world.WorldState, clusterKey string, name string, ...) (uint64, bool, error)
- func EnsureClusterHasJob(ctx context.Context, w world.WorldState, clusterKey, jobKey string) error
- func ListClusterJobs(ctx context.Context, w world.WorldState, clusterKeys ...string) ([]string, error)
- func ListClusterWorkers(ctx context.Context, w world.WorldState, clusterKeys ...string) ([]string, error)
- func LookupClusterOp(ctx context.Context, opTypeID string) (world.Operation, error)
- func NewClusterBlock() block.Block
- func NewClusterToJobQuad(clusterObjKey, jobObjKey string) world.GraphQuad
- func NewClusterToWorkerQuad(clusterObjKey, workerObjKey string) world.GraphQuad
- func StartJob(ctx context.Context, w world.WorldState, clusterKey, jobKey string, ...) (uint64, bool, error)
- type Cluster
- func (m *Cluster) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Cluster) CloneVT() *Cluster
- func (this *Cluster) EqualMessageVT(thatMsg any) bool
- func (this *Cluster) EqualVT(that *Cluster) bool
- func (x *Cluster) GetName() string
- func (x *Cluster) GetPeerId() string
- func (e *Cluster) MarshalBlock() ([]byte, error)
- func (x *Cluster) MarshalJSON() ([]byte, error)
- func (x *Cluster) MarshalProtoJSON(s *json.MarshalState)
- func (x *Cluster) MarshalProtoText() string
- func (m *Cluster) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Cluster) MarshalToVT(dAtA []byte) (int, error)
- func (m *Cluster) MarshalVT() (dAtA []byte, err error)
- func (e *Cluster) ParsePeerID() (peer.ID, error)
- func (*Cluster) ProtoMessage()
- func (x *Cluster) Reset()
- func (m *Cluster) SizeVT() (n int)
- func (x *Cluster) String() string
- func (e *Cluster) UnmarshalBlock(data []byte) error
- func (x *Cluster) UnmarshalJSON(b []byte) error
- func (x *Cluster) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Cluster) UnmarshalVT(dAtA []byte) error
- func (e *Cluster) Validate() error
- type ClusterAssignJobOp
- func (o *ClusterAssignJobOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *ClusterAssignJobOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *ClusterAssignJobOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ClusterAssignJobOp) CloneVT() *ClusterAssignJobOp
- func (this *ClusterAssignJobOp) EqualMessageVT(thatMsg any) bool
- func (this *ClusterAssignJobOp) EqualVT(that *ClusterAssignJobOp) bool
- func (x *ClusterAssignJobOp) GetClusterKey() string
- func (x *ClusterAssignJobOp) GetJobKey() string
- func (o *ClusterAssignJobOp) GetOperationTypeId() string
- func (o *ClusterAssignJobOp) MarshalBlock() ([]byte, error)
- func (x *ClusterAssignJobOp) MarshalJSON() ([]byte, error)
- func (x *ClusterAssignJobOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *ClusterAssignJobOp) MarshalProtoText() string
- func (m *ClusterAssignJobOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ClusterAssignJobOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *ClusterAssignJobOp) MarshalVT() (dAtA []byte, err error)
- func (*ClusterAssignJobOp) ProtoMessage()
- func (x *ClusterAssignJobOp) Reset()
- func (m *ClusterAssignJobOp) SizeVT() (n int)
- func (x *ClusterAssignJobOp) String() string
- func (o *ClusterAssignJobOp) UnmarshalBlock(data []byte) error
- func (x *ClusterAssignJobOp) UnmarshalJSON(b []byte) error
- func (x *ClusterAssignJobOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ClusterAssignJobOp) UnmarshalVT(dAtA []byte) error
- func (o *ClusterAssignJobOp) Validate() error
- type ClusterAssignPeerOp
- func (o *ClusterAssignPeerOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *ClusterAssignPeerOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *ClusterAssignPeerOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ClusterAssignPeerOp) CloneVT() *ClusterAssignPeerOp
- func (this *ClusterAssignPeerOp) EqualMessageVT(thatMsg any) bool
- func (this *ClusterAssignPeerOp) EqualVT(that *ClusterAssignPeerOp) bool
- func (x *ClusterAssignPeerOp) GetClusterKey() string
- func (o *ClusterAssignPeerOp) GetOperationTypeId() string
- func (x *ClusterAssignPeerOp) GetPeerId() string
- func (o *ClusterAssignPeerOp) MarshalBlock() ([]byte, error)
- func (x *ClusterAssignPeerOp) MarshalJSON() ([]byte, error)
- func (x *ClusterAssignPeerOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *ClusterAssignPeerOp) MarshalProtoText() string
- func (m *ClusterAssignPeerOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ClusterAssignPeerOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *ClusterAssignPeerOp) MarshalVT() (dAtA []byte, err error)
- func (o *ClusterAssignPeerOp) ParsePeerID() (peer.ID, error)
- func (*ClusterAssignPeerOp) ProtoMessage()
- func (x *ClusterAssignPeerOp) Reset()
- func (m *ClusterAssignPeerOp) SizeVT() (n int)
- func (x *ClusterAssignPeerOp) String() string
- func (o *ClusterAssignPeerOp) UnmarshalBlock(data []byte) error
- func (x *ClusterAssignPeerOp) UnmarshalJSON(b []byte) error
- func (x *ClusterAssignPeerOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ClusterAssignPeerOp) UnmarshalVT(dAtA []byte) error
- func (o *ClusterAssignPeerOp) Validate() error
- type ClusterAssignTaskOp
- func (o *ClusterAssignTaskOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *ClusterAssignTaskOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *ClusterAssignTaskOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ClusterAssignTaskOp) CloneVT() *ClusterAssignTaskOp
- func (this *ClusterAssignTaskOp) EqualMessageVT(thatMsg any) bool
- func (this *ClusterAssignTaskOp) EqualVT(that *ClusterAssignTaskOp) bool
- func (x *ClusterAssignTaskOp) GetClusterKey() string
- func (x *ClusterAssignTaskOp) GetJobKey() string
- func (o *ClusterAssignTaskOp) GetOperationTypeId() string
- func (x *ClusterAssignTaskOp) GetTaskKey() string
- func (o *ClusterAssignTaskOp) MarshalBlock() ([]byte, error)
- func (x *ClusterAssignTaskOp) MarshalJSON() ([]byte, error)
- func (x *ClusterAssignTaskOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *ClusterAssignTaskOp) MarshalProtoText() string
- func (m *ClusterAssignTaskOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ClusterAssignTaskOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *ClusterAssignTaskOp) MarshalVT() (dAtA []byte, err error)
- func (*ClusterAssignTaskOp) ProtoMessage()
- func (x *ClusterAssignTaskOp) Reset()
- func (m *ClusterAssignTaskOp) SizeVT() (n int)
- func (x *ClusterAssignTaskOp) String() string
- func (o *ClusterAssignTaskOp) UnmarshalBlock(data []byte) error
- func (x *ClusterAssignTaskOp) UnmarshalJSON(b []byte) error
- func (x *ClusterAssignTaskOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ClusterAssignTaskOp) UnmarshalVT(dAtA []byte) error
- func (o *ClusterAssignTaskOp) Validate() error
- type ClusterAssignWorkerOp
- func (o *ClusterAssignWorkerOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *ClusterAssignWorkerOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *ClusterAssignWorkerOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ClusterAssignWorkerOp) CloneVT() *ClusterAssignWorkerOp
- func (this *ClusterAssignWorkerOp) EqualMessageVT(thatMsg any) bool
- func (this *ClusterAssignWorkerOp) EqualVT(that *ClusterAssignWorkerOp) bool
- func (x *ClusterAssignWorkerOp) GetClusterKey() string
- func (o *ClusterAssignWorkerOp) GetOperationTypeId() string
- func (x *ClusterAssignWorkerOp) GetWorkerKey() string
- func (o *ClusterAssignWorkerOp) MarshalBlock() ([]byte, error)
- func (x *ClusterAssignWorkerOp) MarshalJSON() ([]byte, error)
- func (x *ClusterAssignWorkerOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *ClusterAssignWorkerOp) MarshalProtoText() string
- func (m *ClusterAssignWorkerOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ClusterAssignWorkerOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *ClusterAssignWorkerOp) MarshalVT() (dAtA []byte, err error)
- func (*ClusterAssignWorkerOp) ProtoMessage()
- func (x *ClusterAssignWorkerOp) Reset()
- func (m *ClusterAssignWorkerOp) SizeVT() (n int)
- func (x *ClusterAssignWorkerOp) String() string
- func (o *ClusterAssignWorkerOp) UnmarshalBlock(data []byte) error
- func (x *ClusterAssignWorkerOp) UnmarshalJSON(b []byte) error
- func (x *ClusterAssignWorkerOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ClusterAssignWorkerOp) UnmarshalVT(dAtA []byte) error
- func (o *ClusterAssignWorkerOp) Validate() error
- type ClusterCompleteJobOp
- func (o *ClusterCompleteJobOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *ClusterCompleteJobOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *ClusterCompleteJobOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ClusterCompleteJobOp) CloneVT() *ClusterCompleteJobOp
- func (this *ClusterCompleteJobOp) EqualMessageVT(thatMsg any) bool
- func (this *ClusterCompleteJobOp) EqualVT(that *ClusterCompleteJobOp) bool
- func (x *ClusterCompleteJobOp) GetClusterKey() string
- func (x *ClusterCompleteJobOp) GetJobKey() string
- func (o *ClusterCompleteJobOp) GetOperationTypeId() string
- func (o *ClusterCompleteJobOp) MarshalBlock() ([]byte, error)
- func (x *ClusterCompleteJobOp) MarshalJSON() ([]byte, error)
- func (x *ClusterCompleteJobOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *ClusterCompleteJobOp) MarshalProtoText() string
- func (m *ClusterCompleteJobOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ClusterCompleteJobOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *ClusterCompleteJobOp) MarshalVT() (dAtA []byte, err error)
- func (*ClusterCompleteJobOp) ProtoMessage()
- func (x *ClusterCompleteJobOp) Reset()
- func (m *ClusterCompleteJobOp) SizeVT() (n int)
- func (x *ClusterCompleteJobOp) String() string
- func (o *ClusterCompleteJobOp) UnmarshalBlock(data []byte) error
- func (x *ClusterCompleteJobOp) UnmarshalJSON(b []byte) error
- func (x *ClusterCompleteJobOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ClusterCompleteJobOp) UnmarshalVT(dAtA []byte) error
- func (o *ClusterCompleteJobOp) Validate() error
- type ClusterCreateOp
- func (o *ClusterCreateOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *ClusterCreateOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (o *ClusterCreateOp) BuildCluster() *Cluster
- func (m *ClusterCreateOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ClusterCreateOp) CloneVT() *ClusterCreateOp
- func (this *ClusterCreateOp) EqualMessageVT(thatMsg any) bool
- func (this *ClusterCreateOp) EqualVT(that *ClusterCreateOp) bool
- func (x *ClusterCreateOp) GetClusterKey() string
- func (x *ClusterCreateOp) GetName() string
- func (o *ClusterCreateOp) GetOperationTypeId() string
- func (x *ClusterCreateOp) GetPeerId() string
- func (o *ClusterCreateOp) MarshalBlock() ([]byte, error)
- func (x *ClusterCreateOp) MarshalJSON() ([]byte, error)
- func (x *ClusterCreateOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *ClusterCreateOp) MarshalProtoText() string
- func (m *ClusterCreateOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ClusterCreateOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *ClusterCreateOp) MarshalVT() (dAtA []byte, err error)
- func (*ClusterCreateOp) ProtoMessage()
- func (x *ClusterCreateOp) Reset()
- func (m *ClusterCreateOp) SizeVT() (n int)
- func (x *ClusterCreateOp) String() string
- func (o *ClusterCreateOp) UnmarshalBlock(data []byte) error
- func (x *ClusterCreateOp) UnmarshalJSON(b []byte) error
- func (x *ClusterCreateOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ClusterCreateOp) UnmarshalVT(dAtA []byte) error
- func (o *ClusterCreateOp) Validate() error
- type ClusterStartJobOp
- func (o *ClusterStartJobOp) ApplyWorldObjectOp(ctx context.Context, le *logrus.Entry, objectHandle world.ObjectState, ...) (sysErr bool, err error)
- func (o *ClusterStartJobOp) ApplyWorldOp(ctx context.Context, le *logrus.Entry, worldHandle world.WorldState, ...) (sysErr bool, err error)
- func (m *ClusterStartJobOp) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ClusterStartJobOp) CloneVT() *ClusterStartJobOp
- func (this *ClusterStartJobOp) EqualMessageVT(thatMsg any) bool
- func (this *ClusterStartJobOp) EqualVT(that *ClusterStartJobOp) bool
- func (x *ClusterStartJobOp) GetClusterKey() string
- func (x *ClusterStartJobOp) GetJobKey() string
- func (o *ClusterStartJobOp) GetOperationTypeId() string
- func (o *ClusterStartJobOp) MarshalBlock() ([]byte, error)
- func (x *ClusterStartJobOp) MarshalJSON() ([]byte, error)
- func (x *ClusterStartJobOp) MarshalProtoJSON(s *json.MarshalState)
- func (x *ClusterStartJobOp) MarshalProtoText() string
- func (m *ClusterStartJobOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ClusterStartJobOp) MarshalToVT(dAtA []byte) (int, error)
- func (m *ClusterStartJobOp) MarshalVT() (dAtA []byte, err error)
- func (*ClusterStartJobOp) ProtoMessage()
- func (x *ClusterStartJobOp) Reset()
- func (m *ClusterStartJobOp) SizeVT() (n int)
- func (x *ClusterStartJobOp) String() string
- func (o *ClusterStartJobOp) UnmarshalBlock(data []byte) error
- func (x *ClusterStartJobOp) UnmarshalJSON(b []byte) error
- func (x *ClusterStartJobOp) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ClusterStartJobOp) UnmarshalVT(dAtA []byte) error
- func (o *ClusterStartJobOp) Validate() error
Constants ¶
const ( // ClusterTypeID is the type identifier for a Cluster. ClusterTypeID = "forge/cluster" // PredClusterToJob is the predicate linking Cluster to a Job. PredClusterToJob = quad.IRI("forge/cluster-job") // PredClusterToWorker is the predicate linking Cluster to a Worker. PredClusterToWorker = quad.IRI("forge/cluster-worker") )
Variables ¶
var ClusterAssignJobOpId = ClusterTypeID + "/assign-job"
ClusterAssignJobOpId is the cluster assign job operation id.
var ClusterAssignPeerOpId = ClusterTypeID + "/assign-peer"
ClusterAssignPeerOpId is the cluster assign peer operation id.
var ClusterAssignTaskOpId = ClusterTypeID + "/assign-task"
ClusterAssignTaskOpId is the cluster assign task operation id.
var ClusterAssignWorkerOpId = ClusterTypeID + "/assign-worker"
ClusterAssignWorkerOpId is the cluster assign job operation id.
var ClusterCompleteJobOpId = ClusterTypeID + "/complete-job"
ClusterCompleteJobOpId is the cluster complete job operation id.
var ClusterCreateOpId = ClusterTypeID + "/create"
ClusterCreateOpId is the Cluster create operation id.
var ClusterStartJobOpId = ClusterTypeID + "/start-job"
ClusterStartJobOpId is the cluster start job operation id.
Functions ¶
func AssignClusterLeaderPeer ¶
func AssignClusterLeaderPeer( ctx context.Context, w world.WorldState, sender peer.ID, clusterKey string, leaderPeer peer.ID, ) (uint64, bool, error)
AssignClusterLeaderPeer assigns the Cluster controller peer. Returns seqno, sysErr, error.
func AssignJobToCluster ¶
func AssignJobToCluster( ctx context.Context, w world.WorldState, clusterKey, jobKey string, sender peer.ID, ) (uint64, bool, error)
AssignJobToCluster assigns an existing Job object to a Cluster. Returns seqno, sysErr, error.
func AssignTaskToCluster ¶
func AssignTaskToCluster( ctx context.Context, w world.WorldState, clusterKey, jobKey, taskKey string, sender peer.ID, ) (uint64, bool, error)
AssignTaskToCluster assigns an existing Task object to a Cluster. Returns seqno, sysErr, error.
func AssignWorkerToCluster ¶
func AssignWorkerToCluster( ctx context.Context, w world.WorldState, clusterKey, workerKey string, sender peer.ID, ) (uint64, bool, error)
AssignWorkerToCluster assigns an existing Worker object to a Cluster. Returns seqno, sysErr, error.
func CheckClusterHasJob ¶
func CheckClusterHasJob(ctx context.Context, w world.WorldState, clusterKey, jobKey string) (bool, error)
CheckClusterHasJob checks if the cluster is linked to a job.
func CheckClusterType ¶
CheckClusterType checks the type graph quad for a cluster.
func CollectClusterJobs ¶
func CollectClusterJobs( ctx context.Context, ws world.WorldState, clusterKeys ...string, ) ([]*forge_job.Job, []string, error)
CollectClusterJobs collects all active Job linked to by the Cluster. If any of the linked states are invalid, returns an error.
func CollectClusterWorkers ¶
func CollectClusterWorkers( ctx context.Context, ws world.WorldState, clusterKeys ...string, ) ([]*forge_worker.Worker, []string, error)
CollectClusterWorkers collects all Worker linked to by the Cluster. If any of the linked states are invalid, returns an error.
func CompleteJob ¶
func CompleteJob( ctx context.Context, w world.WorldState, clusterKey, jobKey string, sender peer.ID, ) (uint64, bool, error)
CompleteJob starts an existing Job linked to the Cluster. Returns seqno, sysErr, error.
func CreateCluster ¶
func CreateCluster( ctx context.Context, w world.WorldState, clusterKey string, name string, clusterPeerID peer.ID, sender peer.ID, ) (uint64, bool, error)
CreateCluster stores a Cluster in a object associated with an existing Cluster. Optionally creates keypairs linked to the Cluster. Returns seqno, sysErr, error.
func EnsureClusterHasJob ¶
EnsureClusterHasJob checks if the cluster has the job and returns an error otherwise.
func ListClusterJobs ¶
func ListClusterJobs(ctx context.Context, w world.WorldState, clusterKeys ...string) ([]string, error)
ListClusterJobs lists all Job object keys that are linked to by the Cluster.
func ListClusterWorkers ¶
func ListClusterWorkers(ctx context.Context, w world.WorldState, clusterKeys ...string) ([]string, error)
ListClusterWorkers lists all Worker object keys that are linked to by the Cluster.
func LookupClusterOp ¶
LookupClusterOp performs the lookup operation for the Cluster op types.
func NewClusterBlock ¶
NewClusterBlock constructs a new Cluster block.
func NewClusterToJobQuad ¶
NewClusterToJobQuad creates a quad linking a Cluster to a Job.
func NewClusterToWorkerQuad ¶
NewClusterToWorkerQuad creates a quad linking a Cluster to a Worker.
Types ¶
type Cluster ¶
type Cluster struct {
// Name is the cluster name.
// Should be user-readable: like "my-cluster-1"
// Must be a valid DNS label as defined in RFC 1123.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// PeerId is the identifier of the peer controlling the Cluster.
// This peer runs the high-level cluster scheduler.
// Cannot be empty.
PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// contains filtered or unexported fields
}
Cluster associates a set of Worker with a list of Jobs. The name is used for API calls and command-line / UI tools.
Graph links: - forge/cluster-job: links to ongoing Jobs managed by the Cluster. - forge/cluster-worker: links to Worker schedulable in the Cluster.
There are multiple ways to modify Cluster state: - Job, Target, World: can be modified outside of the scope of the Cluster. - Pass, Execution: assigned peer can submit tx to update w/ validation. - Cluster: assigned peer ID can submit forge/cluster/tx w/ validation. - Cluster: can be updated w/ ops: ClusterCreate, ClusterAssignJob, ClusterDelete
func LookupCluster ¶
func LookupCluster(ctx context.Context, ws world.WorldState, objKey string) (*Cluster, world.ObjectState, error)
LookupCluster looks up a cluster in the world.
func UnmarshalCluster ¶
UnmarshalCluster unmarshals a worker block from the cursor.
func (*Cluster) CloneMessageVT ¶
func (m *Cluster) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Cluster) EqualMessageVT ¶
func (*Cluster) MarshalBlock ¶
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*Cluster) MarshalJSON ¶
MarshalJSON marshals the Cluster to JSON.
func (*Cluster) MarshalProtoJSON ¶
func (x *Cluster) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Cluster message to JSON.
func (*Cluster) MarshalProtoText ¶
func (*Cluster) MarshalToSizedBufferVT ¶
func (*Cluster) ParsePeerID ¶
ParsePeerID parses the peer ID field.
func (*Cluster) ProtoMessage ¶
func (*Cluster) ProtoMessage()
func (*Cluster) UnmarshalBlock ¶
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*Cluster) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Cluster from JSON.
func (*Cluster) UnmarshalProtoJSON ¶
func (x *Cluster) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Cluster message from JSON.
func (*Cluster) UnmarshalVT ¶
type ClusterAssignJobOp ¶
type ClusterAssignJobOp struct {
// ClusterKey is the object key for the Cluster.
ClusterKey string `protobuf:"bytes,1,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
// JobKey is the object key for the Job.
JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"jobKey,omitempty"`
// contains filtered or unexported fields
}
ClusterAssignJobOp assigns a Job to a Cluster.
func NewClusterAssignJobOp ¶
func NewClusterAssignJobOp(clusterKey, jobKey string) *ClusterAssignJobOp
NewClusterAssignJobOp constructs a new ClusterAssignJobOp block.
func (*ClusterAssignJobOp) ApplyWorldObjectOp ¶
func (o *ClusterAssignJobOp) 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 (*ClusterAssignJobOp) ApplyWorldOp ¶
func (o *ClusterAssignJobOp) 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 (*ClusterAssignJobOp) CloneMessageVT ¶
func (m *ClusterAssignJobOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ClusterAssignJobOp) CloneVT ¶
func (m *ClusterAssignJobOp) CloneVT() *ClusterAssignJobOp
func (*ClusterAssignJobOp) EqualMessageVT ¶
func (this *ClusterAssignJobOp) EqualMessageVT(thatMsg any) bool
func (*ClusterAssignJobOp) EqualVT ¶
func (this *ClusterAssignJobOp) EqualVT(that *ClusterAssignJobOp) bool
func (*ClusterAssignJobOp) GetClusterKey ¶
func (x *ClusterAssignJobOp) GetClusterKey() string
func (*ClusterAssignJobOp) GetJobKey ¶
func (x *ClusterAssignJobOp) GetJobKey() string
func (*ClusterAssignJobOp) GetOperationTypeId ¶
func (o *ClusterAssignJobOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*ClusterAssignJobOp) MarshalBlock ¶
func (o *ClusterAssignJobOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ClusterAssignJobOp) MarshalJSON ¶
func (x *ClusterAssignJobOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ClusterAssignJobOp to JSON.
func (*ClusterAssignJobOp) MarshalProtoJSON ¶
func (x *ClusterAssignJobOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ClusterAssignJobOp message to JSON.
func (*ClusterAssignJobOp) MarshalProtoText ¶
func (x *ClusterAssignJobOp) MarshalProtoText() string
func (*ClusterAssignJobOp) MarshalToSizedBufferVT ¶
func (m *ClusterAssignJobOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ClusterAssignJobOp) MarshalToVT ¶
func (m *ClusterAssignJobOp) MarshalToVT(dAtA []byte) (int, error)
func (*ClusterAssignJobOp) MarshalVT ¶
func (m *ClusterAssignJobOp) MarshalVT() (dAtA []byte, err error)
func (*ClusterAssignJobOp) ProtoMessage ¶
func (*ClusterAssignJobOp) ProtoMessage()
func (*ClusterAssignJobOp) Reset ¶
func (x *ClusterAssignJobOp) Reset()
func (*ClusterAssignJobOp) SizeVT ¶
func (m *ClusterAssignJobOp) SizeVT() (n int)
func (*ClusterAssignJobOp) String ¶
func (x *ClusterAssignJobOp) String() string
func (*ClusterAssignJobOp) UnmarshalBlock ¶
func (o *ClusterAssignJobOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ClusterAssignJobOp) UnmarshalJSON ¶
func (x *ClusterAssignJobOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ClusterAssignJobOp from JSON.
func (*ClusterAssignJobOp) UnmarshalProtoJSON ¶
func (x *ClusterAssignJobOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ClusterAssignJobOp message from JSON.
func (*ClusterAssignJobOp) UnmarshalVT ¶
func (m *ClusterAssignJobOp) UnmarshalVT(dAtA []byte) error
func (*ClusterAssignJobOp) Validate ¶
func (o *ClusterAssignJobOp) Validate() error
Validate performs cursory validation of the operation. Should not block.
type ClusterAssignPeerOp ¶
type ClusterAssignPeerOp struct {
// ClusterKey is the object key for the Cluster.
ClusterKey string `protobuf:"bytes,1,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
// PeerId is the updated peer id for the cluster.
// Cannot be empty.
PeerId string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// contains filtered or unexported fields
}
ClusterAssignPeerOp sets the peer_id for the Cluster controller. Creates and/or links to a Keypair for the peer id.
func NewClusterAssignPeerOp ¶
func NewClusterAssignPeerOp(clusterKey string, peerID peer.ID) *ClusterAssignPeerOp
NewClusterAssignPeerOp constructs a new ClusterAssignPeerOp block.
func (*ClusterAssignPeerOp) ApplyWorldObjectOp ¶
func (o *ClusterAssignPeerOp) 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 (*ClusterAssignPeerOp) ApplyWorldOp ¶
func (o *ClusterAssignPeerOp) 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 (*ClusterAssignPeerOp) CloneMessageVT ¶
func (m *ClusterAssignPeerOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ClusterAssignPeerOp) CloneVT ¶
func (m *ClusterAssignPeerOp) CloneVT() *ClusterAssignPeerOp
func (*ClusterAssignPeerOp) EqualMessageVT ¶
func (this *ClusterAssignPeerOp) EqualMessageVT(thatMsg any) bool
func (*ClusterAssignPeerOp) EqualVT ¶
func (this *ClusterAssignPeerOp) EqualVT(that *ClusterAssignPeerOp) bool
func (*ClusterAssignPeerOp) GetClusterKey ¶
func (x *ClusterAssignPeerOp) GetClusterKey() string
func (*ClusterAssignPeerOp) GetOperationTypeId ¶
func (o *ClusterAssignPeerOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*ClusterAssignPeerOp) GetPeerId ¶
func (x *ClusterAssignPeerOp) GetPeerId() string
func (*ClusterAssignPeerOp) MarshalBlock ¶
func (o *ClusterAssignPeerOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ClusterAssignPeerOp) MarshalJSON ¶
func (x *ClusterAssignPeerOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ClusterAssignPeerOp to JSON.
func (*ClusterAssignPeerOp) MarshalProtoJSON ¶
func (x *ClusterAssignPeerOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ClusterAssignPeerOp message to JSON.
func (*ClusterAssignPeerOp) MarshalProtoText ¶
func (x *ClusterAssignPeerOp) MarshalProtoText() string
func (*ClusterAssignPeerOp) MarshalToSizedBufferVT ¶
func (m *ClusterAssignPeerOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ClusterAssignPeerOp) MarshalToVT ¶
func (m *ClusterAssignPeerOp) MarshalToVT(dAtA []byte) (int, error)
func (*ClusterAssignPeerOp) MarshalVT ¶
func (m *ClusterAssignPeerOp) MarshalVT() (dAtA []byte, err error)
func (*ClusterAssignPeerOp) ParsePeerID ¶
func (o *ClusterAssignPeerOp) ParsePeerID() (peer.ID, error)
ParsePeerID parses the peer ID field.
func (*ClusterAssignPeerOp) ProtoMessage ¶
func (*ClusterAssignPeerOp) ProtoMessage()
func (*ClusterAssignPeerOp) Reset ¶
func (x *ClusterAssignPeerOp) Reset()
func (*ClusterAssignPeerOp) SizeVT ¶
func (m *ClusterAssignPeerOp) SizeVT() (n int)
func (*ClusterAssignPeerOp) String ¶
func (x *ClusterAssignPeerOp) String() string
func (*ClusterAssignPeerOp) UnmarshalBlock ¶
func (o *ClusterAssignPeerOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ClusterAssignPeerOp) UnmarshalJSON ¶
func (x *ClusterAssignPeerOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ClusterAssignPeerOp from JSON.
func (*ClusterAssignPeerOp) UnmarshalProtoJSON ¶
func (x *ClusterAssignPeerOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ClusterAssignPeerOp message from JSON.
func (*ClusterAssignPeerOp) UnmarshalVT ¶
func (m *ClusterAssignPeerOp) UnmarshalVT(dAtA []byte) error
func (*ClusterAssignPeerOp) Validate ¶
func (o *ClusterAssignPeerOp) Validate() error
Validate performs cursory validation of the operation. Should not block.
type ClusterAssignTaskOp ¶
type ClusterAssignTaskOp struct {
// ClusterKey is the object key for the Cluster.
ClusterKey string `protobuf:"bytes,1,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
// JobKey is the object key for the Job.
JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"jobKey,omitempty"`
// TaskKey is the object key for the Task.
TaskKey string `protobuf:"bytes,3,opt,name=task_key,json=taskKey,proto3" json:"taskKey,omitempty"`
// contains filtered or unexported fields
}
ClusterAssignTaskOp sets the peer_id for a Task to the Cluster peer ID. Verifies that the cluster, job, and task are linked properly.
func NewClusterAssignTaskOp ¶
func NewClusterAssignTaskOp(clusterKey, jobKey, taskKey string) *ClusterAssignTaskOp
NewClusterAssignTaskOp constructs a new ClusterAssignTaskOp block.
func (*ClusterAssignTaskOp) ApplyWorldObjectOp ¶
func (o *ClusterAssignTaskOp) 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 (*ClusterAssignTaskOp) ApplyWorldOp ¶
func (o *ClusterAssignTaskOp) 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 (*ClusterAssignTaskOp) CloneMessageVT ¶
func (m *ClusterAssignTaskOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ClusterAssignTaskOp) CloneVT ¶
func (m *ClusterAssignTaskOp) CloneVT() *ClusterAssignTaskOp
func (*ClusterAssignTaskOp) EqualMessageVT ¶
func (this *ClusterAssignTaskOp) EqualMessageVT(thatMsg any) bool
func (*ClusterAssignTaskOp) EqualVT ¶
func (this *ClusterAssignTaskOp) EqualVT(that *ClusterAssignTaskOp) bool
func (*ClusterAssignTaskOp) GetClusterKey ¶
func (x *ClusterAssignTaskOp) GetClusterKey() string
func (*ClusterAssignTaskOp) GetJobKey ¶
func (x *ClusterAssignTaskOp) GetJobKey() string
func (*ClusterAssignTaskOp) GetOperationTypeId ¶
func (o *ClusterAssignTaskOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*ClusterAssignTaskOp) GetTaskKey ¶
func (x *ClusterAssignTaskOp) GetTaskKey() string
func (*ClusterAssignTaskOp) MarshalBlock ¶
func (o *ClusterAssignTaskOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ClusterAssignTaskOp) MarshalJSON ¶
func (x *ClusterAssignTaskOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ClusterAssignTaskOp to JSON.
func (*ClusterAssignTaskOp) MarshalProtoJSON ¶
func (x *ClusterAssignTaskOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ClusterAssignTaskOp message to JSON.
func (*ClusterAssignTaskOp) MarshalProtoText ¶
func (x *ClusterAssignTaskOp) MarshalProtoText() string
func (*ClusterAssignTaskOp) MarshalToSizedBufferVT ¶
func (m *ClusterAssignTaskOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ClusterAssignTaskOp) MarshalToVT ¶
func (m *ClusterAssignTaskOp) MarshalToVT(dAtA []byte) (int, error)
func (*ClusterAssignTaskOp) MarshalVT ¶
func (m *ClusterAssignTaskOp) MarshalVT() (dAtA []byte, err error)
func (*ClusterAssignTaskOp) ProtoMessage ¶
func (*ClusterAssignTaskOp) ProtoMessage()
func (*ClusterAssignTaskOp) Reset ¶
func (x *ClusterAssignTaskOp) Reset()
func (*ClusterAssignTaskOp) SizeVT ¶
func (m *ClusterAssignTaskOp) SizeVT() (n int)
func (*ClusterAssignTaskOp) String ¶
func (x *ClusterAssignTaskOp) String() string
func (*ClusterAssignTaskOp) UnmarshalBlock ¶
func (o *ClusterAssignTaskOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ClusterAssignTaskOp) UnmarshalJSON ¶
func (x *ClusterAssignTaskOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ClusterAssignTaskOp from JSON.
func (*ClusterAssignTaskOp) UnmarshalProtoJSON ¶
func (x *ClusterAssignTaskOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ClusterAssignTaskOp message from JSON.
func (*ClusterAssignTaskOp) UnmarshalVT ¶
func (m *ClusterAssignTaskOp) UnmarshalVT(dAtA []byte) error
func (*ClusterAssignTaskOp) Validate ¶
func (o *ClusterAssignTaskOp) Validate() error
Validate performs cursory validation of the operation. Should not block.
type ClusterAssignWorkerOp ¶
type ClusterAssignWorkerOp struct {
// ClusterKey is the object key for the Cluster.
ClusterKey string `protobuf:"bytes,1,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
// WorkerKey is the object key for the Worker.
WorkerKey string `protobuf:"bytes,2,opt,name=worker_key,json=workerKey,proto3" json:"workerKey,omitempty"`
// contains filtered or unexported fields
}
ClusterAssignWorkerOp assigns a Worker to a Cluster.
func NewClusterAssignWorkerOp ¶
func NewClusterAssignWorkerOp(clusterKey, workerKey string) *ClusterAssignWorkerOp
NewClusterAssignWorkerOp constructs a new ClusterAssignWorkerOp block.
func (*ClusterAssignWorkerOp) ApplyWorldObjectOp ¶
func (o *ClusterAssignWorkerOp) 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 (*ClusterAssignWorkerOp) ApplyWorldOp ¶
func (o *ClusterAssignWorkerOp) 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 (*ClusterAssignWorkerOp) CloneMessageVT ¶
func (m *ClusterAssignWorkerOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ClusterAssignWorkerOp) CloneVT ¶
func (m *ClusterAssignWorkerOp) CloneVT() *ClusterAssignWorkerOp
func (*ClusterAssignWorkerOp) EqualMessageVT ¶
func (this *ClusterAssignWorkerOp) EqualMessageVT(thatMsg any) bool
func (*ClusterAssignWorkerOp) EqualVT ¶
func (this *ClusterAssignWorkerOp) EqualVT(that *ClusterAssignWorkerOp) bool
func (*ClusterAssignWorkerOp) GetClusterKey ¶
func (x *ClusterAssignWorkerOp) GetClusterKey() string
func (*ClusterAssignWorkerOp) GetOperationTypeId ¶
func (o *ClusterAssignWorkerOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*ClusterAssignWorkerOp) GetWorkerKey ¶
func (x *ClusterAssignWorkerOp) GetWorkerKey() string
func (*ClusterAssignWorkerOp) MarshalBlock ¶
func (o *ClusterAssignWorkerOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ClusterAssignWorkerOp) MarshalJSON ¶
func (x *ClusterAssignWorkerOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ClusterAssignWorkerOp to JSON.
func (*ClusterAssignWorkerOp) MarshalProtoJSON ¶
func (x *ClusterAssignWorkerOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ClusterAssignWorkerOp message to JSON.
func (*ClusterAssignWorkerOp) MarshalProtoText ¶
func (x *ClusterAssignWorkerOp) MarshalProtoText() string
func (*ClusterAssignWorkerOp) MarshalToSizedBufferVT ¶
func (m *ClusterAssignWorkerOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ClusterAssignWorkerOp) MarshalToVT ¶
func (m *ClusterAssignWorkerOp) MarshalToVT(dAtA []byte) (int, error)
func (*ClusterAssignWorkerOp) MarshalVT ¶
func (m *ClusterAssignWorkerOp) MarshalVT() (dAtA []byte, err error)
func (*ClusterAssignWorkerOp) ProtoMessage ¶
func (*ClusterAssignWorkerOp) ProtoMessage()
func (*ClusterAssignWorkerOp) Reset ¶
func (x *ClusterAssignWorkerOp) Reset()
func (*ClusterAssignWorkerOp) SizeVT ¶
func (m *ClusterAssignWorkerOp) SizeVT() (n int)
func (*ClusterAssignWorkerOp) String ¶
func (x *ClusterAssignWorkerOp) String() string
func (*ClusterAssignWorkerOp) UnmarshalBlock ¶
func (o *ClusterAssignWorkerOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ClusterAssignWorkerOp) UnmarshalJSON ¶
func (x *ClusterAssignWorkerOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ClusterAssignWorkerOp from JSON.
func (*ClusterAssignWorkerOp) UnmarshalProtoJSON ¶
func (x *ClusterAssignWorkerOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ClusterAssignWorkerOp message from JSON.
func (*ClusterAssignWorkerOp) UnmarshalVT ¶
func (m *ClusterAssignWorkerOp) UnmarshalVT(dAtA []byte) error
func (*ClusterAssignWorkerOp) Validate ¶
func (o *ClusterAssignWorkerOp) Validate() error
Validate performs cursory validation of the operation. Should not block.
type ClusterCompleteJobOp ¶
type ClusterCompleteJobOp struct {
// ClusterKey is the object key for the Cluster.
ClusterKey string `protobuf:"bytes,1,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
// JobKey is the object key for the Job.
JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"jobKey,omitempty"`
// contains filtered or unexported fields
}
ClusterCompleteJobOp transitions a assigned Job from RUNNING to COMPLETE.
Must be in the RUNNING state. All assigned Task must be in COMPLETE state. If any failed, the Job will also fail.
func NewClusterCompleteJobOp ¶
func NewClusterCompleteJobOp(clusterKey, jobKey string) *ClusterCompleteJobOp
NewClusterCompleteJobOp constructs a new ClusterCompleteJobOp block.
func (*ClusterCompleteJobOp) ApplyWorldObjectOp ¶
func (o *ClusterCompleteJobOp) 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 (*ClusterCompleteJobOp) ApplyWorldOp ¶
func (o *ClusterCompleteJobOp) 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 (*ClusterCompleteJobOp) CloneMessageVT ¶
func (m *ClusterCompleteJobOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ClusterCompleteJobOp) CloneVT ¶
func (m *ClusterCompleteJobOp) CloneVT() *ClusterCompleteJobOp
func (*ClusterCompleteJobOp) EqualMessageVT ¶
func (this *ClusterCompleteJobOp) EqualMessageVT(thatMsg any) bool
func (*ClusterCompleteJobOp) EqualVT ¶
func (this *ClusterCompleteJobOp) EqualVT(that *ClusterCompleteJobOp) bool
func (*ClusterCompleteJobOp) GetClusterKey ¶
func (x *ClusterCompleteJobOp) GetClusterKey() string
func (*ClusterCompleteJobOp) GetJobKey ¶
func (x *ClusterCompleteJobOp) GetJobKey() string
func (*ClusterCompleteJobOp) GetOperationTypeId ¶
func (o *ClusterCompleteJobOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*ClusterCompleteJobOp) MarshalBlock ¶
func (o *ClusterCompleteJobOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ClusterCompleteJobOp) MarshalJSON ¶
func (x *ClusterCompleteJobOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ClusterCompleteJobOp to JSON.
func (*ClusterCompleteJobOp) MarshalProtoJSON ¶
func (x *ClusterCompleteJobOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ClusterCompleteJobOp message to JSON.
func (*ClusterCompleteJobOp) MarshalProtoText ¶
func (x *ClusterCompleteJobOp) MarshalProtoText() string
func (*ClusterCompleteJobOp) MarshalToSizedBufferVT ¶
func (m *ClusterCompleteJobOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ClusterCompleteJobOp) MarshalToVT ¶
func (m *ClusterCompleteJobOp) MarshalToVT(dAtA []byte) (int, error)
func (*ClusterCompleteJobOp) MarshalVT ¶
func (m *ClusterCompleteJobOp) MarshalVT() (dAtA []byte, err error)
func (*ClusterCompleteJobOp) ProtoMessage ¶
func (*ClusterCompleteJobOp) ProtoMessage()
func (*ClusterCompleteJobOp) Reset ¶
func (x *ClusterCompleteJobOp) Reset()
func (*ClusterCompleteJobOp) SizeVT ¶
func (m *ClusterCompleteJobOp) SizeVT() (n int)
func (*ClusterCompleteJobOp) String ¶
func (x *ClusterCompleteJobOp) String() string
func (*ClusterCompleteJobOp) UnmarshalBlock ¶
func (o *ClusterCompleteJobOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ClusterCompleteJobOp) UnmarshalJSON ¶
func (x *ClusterCompleteJobOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ClusterCompleteJobOp from JSON.
func (*ClusterCompleteJobOp) UnmarshalProtoJSON ¶
func (x *ClusterCompleteJobOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ClusterCompleteJobOp message from JSON.
func (*ClusterCompleteJobOp) UnmarshalVT ¶
func (m *ClusterCompleteJobOp) UnmarshalVT(dAtA []byte) error
func (*ClusterCompleteJobOp) Validate ¶
func (o *ClusterCompleteJobOp) Validate() error
Validate performs cursory validation of the operation. Should not block.
type ClusterCreateOp ¶
type ClusterCreateOp struct {
// ClusterKey is the object key for the new Cluster.
ClusterKey string `protobuf:"bytes,1,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
// Name is the name to create.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// PeerId is the identifier of the peer controlling the Cluster.
// This peer runs the high-level cluster scheduler.
// Cannot be empty.
PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
// contains filtered or unexported fields
}
ClusterCreateOp creates a new Cluster.
func NewClusterCreateOp ¶
func NewClusterCreateOp(clusterKey, name string, peerID peer.ID) *ClusterCreateOp
NewClusterCreateOp constructs a new ClusterCreateOp block.
func (*ClusterCreateOp) ApplyWorldObjectOp ¶
func (o *ClusterCreateOp) 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 (*ClusterCreateOp) ApplyWorldOp ¶
func (o *ClusterCreateOp) 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 (*ClusterCreateOp) BuildCluster ¶
func (o *ClusterCreateOp) BuildCluster() *Cluster
BuildCluster builds the Cluster object from the create op.
func (*ClusterCreateOp) CloneMessageVT ¶
func (m *ClusterCreateOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ClusterCreateOp) CloneVT ¶
func (m *ClusterCreateOp) CloneVT() *ClusterCreateOp
func (*ClusterCreateOp) EqualMessageVT ¶
func (this *ClusterCreateOp) EqualMessageVT(thatMsg any) bool
func (*ClusterCreateOp) EqualVT ¶
func (this *ClusterCreateOp) EqualVT(that *ClusterCreateOp) bool
func (*ClusterCreateOp) GetClusterKey ¶
func (x *ClusterCreateOp) GetClusterKey() string
func (*ClusterCreateOp) GetName ¶
func (x *ClusterCreateOp) GetName() string
func (*ClusterCreateOp) GetOperationTypeId ¶
func (o *ClusterCreateOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*ClusterCreateOp) GetPeerId ¶
func (x *ClusterCreateOp) GetPeerId() string
func (*ClusterCreateOp) MarshalBlock ¶
func (o *ClusterCreateOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ClusterCreateOp) MarshalJSON ¶
func (x *ClusterCreateOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ClusterCreateOp to JSON.
func (*ClusterCreateOp) MarshalProtoJSON ¶
func (x *ClusterCreateOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ClusterCreateOp message to JSON.
func (*ClusterCreateOp) MarshalProtoText ¶
func (x *ClusterCreateOp) MarshalProtoText() string
func (*ClusterCreateOp) MarshalToSizedBufferVT ¶
func (m *ClusterCreateOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ClusterCreateOp) MarshalToVT ¶
func (m *ClusterCreateOp) MarshalToVT(dAtA []byte) (int, error)
func (*ClusterCreateOp) MarshalVT ¶
func (m *ClusterCreateOp) MarshalVT() (dAtA []byte, err error)
func (*ClusterCreateOp) ProtoMessage ¶
func (*ClusterCreateOp) ProtoMessage()
func (*ClusterCreateOp) Reset ¶
func (x *ClusterCreateOp) Reset()
func (*ClusterCreateOp) SizeVT ¶
func (m *ClusterCreateOp) SizeVT() (n int)
func (*ClusterCreateOp) String ¶
func (x *ClusterCreateOp) String() string
func (*ClusterCreateOp) UnmarshalBlock ¶
func (o *ClusterCreateOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ClusterCreateOp) UnmarshalJSON ¶
func (x *ClusterCreateOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ClusterCreateOp from JSON.
func (*ClusterCreateOp) UnmarshalProtoJSON ¶
func (x *ClusterCreateOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ClusterCreateOp message from JSON.
func (*ClusterCreateOp) UnmarshalVT ¶
func (m *ClusterCreateOp) UnmarshalVT(dAtA []byte) error
func (*ClusterCreateOp) Validate ¶
func (o *ClusterCreateOp) Validate() error
Validate performs cursory validation of the operation. PeerId is optional here: defaults to sender in ApplyWorldOp.
type ClusterStartJobOp ¶
type ClusterStartJobOp struct {
// ClusterKey is the object key for the Cluster.
ClusterKey string `protobuf:"bytes,1,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
// JobKey is the object key for the Job.
JobKey string `protobuf:"bytes,2,opt,name=job_key,json=jobKey,proto3" json:"jobKey,omitempty"`
// contains filtered or unexported fields
}
ClusterStartJobOp transitions a assigned Job from PENDING to RUNNING.
func NewClusterStartJobOp ¶
func NewClusterStartJobOp(clusterKey, jobKey string) *ClusterStartJobOp
NewClusterStartJobOp constructs a new ClusterStartJobOp block.
func (*ClusterStartJobOp) ApplyWorldObjectOp ¶
func (o *ClusterStartJobOp) 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 (*ClusterStartJobOp) ApplyWorldOp ¶
func (o *ClusterStartJobOp) 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 (*ClusterStartJobOp) CloneMessageVT ¶
func (m *ClusterStartJobOp) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ClusterStartJobOp) CloneVT ¶
func (m *ClusterStartJobOp) CloneVT() *ClusterStartJobOp
func (*ClusterStartJobOp) EqualMessageVT ¶
func (this *ClusterStartJobOp) EqualMessageVT(thatMsg any) bool
func (*ClusterStartJobOp) EqualVT ¶
func (this *ClusterStartJobOp) EqualVT(that *ClusterStartJobOp) bool
func (*ClusterStartJobOp) GetClusterKey ¶
func (x *ClusterStartJobOp) GetClusterKey() string
func (*ClusterStartJobOp) GetJobKey ¶
func (x *ClusterStartJobOp) GetJobKey() string
func (*ClusterStartJobOp) GetOperationTypeId ¶
func (o *ClusterStartJobOp) GetOperationTypeId() string
GetOperationTypeId returns the operation type identifier.
func (*ClusterStartJobOp) MarshalBlock ¶
func (o *ClusterStartJobOp) MarshalBlock() ([]byte, error)
MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.
func (*ClusterStartJobOp) MarshalJSON ¶
func (x *ClusterStartJobOp) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ClusterStartJobOp to JSON.
func (*ClusterStartJobOp) MarshalProtoJSON ¶
func (x *ClusterStartJobOp) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ClusterStartJobOp message to JSON.
func (*ClusterStartJobOp) MarshalProtoText ¶
func (x *ClusterStartJobOp) MarshalProtoText() string
func (*ClusterStartJobOp) MarshalToSizedBufferVT ¶
func (m *ClusterStartJobOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ClusterStartJobOp) MarshalToVT ¶
func (m *ClusterStartJobOp) MarshalToVT(dAtA []byte) (int, error)
func (*ClusterStartJobOp) MarshalVT ¶
func (m *ClusterStartJobOp) MarshalVT() (dAtA []byte, err error)
func (*ClusterStartJobOp) ProtoMessage ¶
func (*ClusterStartJobOp) ProtoMessage()
func (*ClusterStartJobOp) Reset ¶
func (x *ClusterStartJobOp) Reset()
func (*ClusterStartJobOp) SizeVT ¶
func (m *ClusterStartJobOp) SizeVT() (n int)
func (*ClusterStartJobOp) String ¶
func (x *ClusterStartJobOp) String() string
func (*ClusterStartJobOp) UnmarshalBlock ¶
func (o *ClusterStartJobOp) UnmarshalBlock(data []byte) error
UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.
func (*ClusterStartJobOp) UnmarshalJSON ¶
func (x *ClusterStartJobOp) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ClusterStartJobOp from JSON.
func (*ClusterStartJobOp) UnmarshalProtoJSON ¶
func (x *ClusterStartJobOp) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ClusterStartJobOp message from JSON.
func (*ClusterStartJobOp) UnmarshalVT ¶
func (m *ClusterStartJobOp) UnmarshalVT(dAtA []byte) error
func (*ClusterStartJobOp) Validate ¶
func (o *ClusterStartJobOp) Validate() error
Validate performs cursory validation of the operation. Should not block.