forge_job_ops

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ForgeJobCreateOpId = "spacewave/forge/job/create"

ForgeJobCreateOpId is the operation id for ForgeJobCreateOp.

Functions

func LookupForgeJobCreateOp

func LookupForgeJobCreateOp(ctx context.Context, operationTypeID string) (world.Operation, error)

LookupForgeJobCreateOp looks up a ForgeJobCreateOp operation type.

Types

type ForgeJobCreateOp

type ForgeJobCreateOp struct {

	// JobKey is the object key for the new Job.
	JobKey string `protobuf:"bytes,1,opt,name=job_key,json=jobKey,proto3" json:"jobKey,omitempty"`
	// ClusterKey is the object key of the Cluster to assign the Job to.
	ClusterKey string `protobuf:"bytes,2,opt,name=cluster_key,json=clusterKey,proto3" json:"clusterKey,omitempty"`
	// TaskDefs is the list of tasks to create under the Job.
	TaskDefs []*ForgeJobTaskDef `protobuf:"bytes,3,rep,name=task_defs,json=taskDefs,proto3" json:"taskDefs,omitempty"`
	// Timestamp is the creation timestamp.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

ForgeJobCreateOp creates a Forge Job with tasks and assigns it to a Cluster. Wraps CreateJobWithTasks + ClusterAssignJobOp in a single world op.

func (*ForgeJobCreateOp) ApplyWorldObjectOp

func (o *ForgeJobCreateOp) ApplyWorldObjectOp(
	ctx context.Context,
	le *logrus.Entry,
	os world.ObjectState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldObjectOp applies the operation to a world object handle.

func (*ForgeJobCreateOp) ApplyWorldOp

func (o *ForgeJobCreateOp) ApplyWorldOp(
	ctx context.Context,
	le *logrus.Entry,
	ws world.WorldState,
	sender peer.ID,
) (sysErr bool, err error)

ApplyWorldOp applies the operation as a world operation.

func (*ForgeJobCreateOp) CloneMessageVT

func (m *ForgeJobCreateOp) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ForgeJobCreateOp) CloneVT

func (m *ForgeJobCreateOp) CloneVT() *ForgeJobCreateOp

func (*ForgeJobCreateOp) EqualMessageVT

func (this *ForgeJobCreateOp) EqualMessageVT(thatMsg any) bool

func (*ForgeJobCreateOp) EqualVT

func (this *ForgeJobCreateOp) EqualVT(that *ForgeJobCreateOp) bool

func (*ForgeJobCreateOp) GetClusterKey

func (x *ForgeJobCreateOp) GetClusterKey() string

func (*ForgeJobCreateOp) GetJobKey

func (x *ForgeJobCreateOp) GetJobKey() string

func (*ForgeJobCreateOp) GetOperationTypeId

func (o *ForgeJobCreateOp) GetOperationTypeId() string

GetOperationTypeId returns the operation type identifier.

func (*ForgeJobCreateOp) GetTaskDefs

func (x *ForgeJobCreateOp) GetTaskDefs() []*ForgeJobTaskDef

func (*ForgeJobCreateOp) GetTimestamp

func (x *ForgeJobCreateOp) GetTimestamp() *timestamppb.Timestamp

func (*ForgeJobCreateOp) MarshalBlock

func (o *ForgeJobCreateOp) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary.

func (*ForgeJobCreateOp) MarshalJSON

func (x *ForgeJobCreateOp) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ForgeJobCreateOp to JSON.

func (*ForgeJobCreateOp) MarshalProtoJSON

func (x *ForgeJobCreateOp) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ForgeJobCreateOp message to JSON.

func (*ForgeJobCreateOp) MarshalProtoText

func (x *ForgeJobCreateOp) MarshalProtoText() string

func (*ForgeJobCreateOp) MarshalToSizedBufferVT

func (m *ForgeJobCreateOp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ForgeJobCreateOp) MarshalToVT

func (m *ForgeJobCreateOp) MarshalToVT(dAtA []byte) (int, error)

func (*ForgeJobCreateOp) MarshalVT

func (m *ForgeJobCreateOp) MarshalVT() (dAtA []byte, err error)

func (*ForgeJobCreateOp) ProtoMessage

func (*ForgeJobCreateOp) ProtoMessage()

func (*ForgeJobCreateOp) Reset

func (x *ForgeJobCreateOp) Reset()

func (*ForgeJobCreateOp) SizeVT

func (m *ForgeJobCreateOp) SizeVT() (n int)

func (*ForgeJobCreateOp) String

func (x *ForgeJobCreateOp) String() string

func (*ForgeJobCreateOp) UnmarshalBlock

func (o *ForgeJobCreateOp) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object.

func (*ForgeJobCreateOp) UnmarshalJSON

func (x *ForgeJobCreateOp) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ForgeJobCreateOp from JSON.

func (*ForgeJobCreateOp) UnmarshalProtoJSON

func (x *ForgeJobCreateOp) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ForgeJobCreateOp message from JSON.

func (*ForgeJobCreateOp) UnmarshalVT

func (m *ForgeJobCreateOp) UnmarshalVT(dAtA []byte) error

func (*ForgeJobCreateOp) Validate

func (o *ForgeJobCreateOp) Validate() error

Validate performs cursory validation of the operation.

type ForgeJobTaskDef

type ForgeJobTaskDef struct {

	// Name is the task name (must be a valid DNS label).
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

ForgeJobTaskDef defines a task to create as part of a ForgeJobCreateOp.

func (*ForgeJobTaskDef) CloneMessageVT

func (m *ForgeJobTaskDef) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ForgeJobTaskDef) CloneVT

func (m *ForgeJobTaskDef) CloneVT() *ForgeJobTaskDef

func (*ForgeJobTaskDef) EqualMessageVT

func (this *ForgeJobTaskDef) EqualMessageVT(thatMsg any) bool

func (*ForgeJobTaskDef) EqualVT

func (this *ForgeJobTaskDef) EqualVT(that *ForgeJobTaskDef) bool

func (*ForgeJobTaskDef) GetName

func (x *ForgeJobTaskDef) GetName() string

func (*ForgeJobTaskDef) MarshalJSON

func (x *ForgeJobTaskDef) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ForgeJobTaskDef to JSON.

func (*ForgeJobTaskDef) MarshalProtoJSON

func (x *ForgeJobTaskDef) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ForgeJobTaskDef message to JSON.

func (*ForgeJobTaskDef) MarshalProtoText

func (x *ForgeJobTaskDef) MarshalProtoText() string

func (*ForgeJobTaskDef) MarshalToSizedBufferVT

func (m *ForgeJobTaskDef) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ForgeJobTaskDef) MarshalToVT

func (m *ForgeJobTaskDef) MarshalToVT(dAtA []byte) (int, error)

func (*ForgeJobTaskDef) MarshalVT

func (m *ForgeJobTaskDef) MarshalVT() (dAtA []byte, err error)

func (*ForgeJobTaskDef) ProtoMessage

func (*ForgeJobTaskDef) ProtoMessage()

func (*ForgeJobTaskDef) Reset

func (x *ForgeJobTaskDef) Reset()

func (*ForgeJobTaskDef) SizeVT

func (m *ForgeJobTaskDef) SizeVT() (n int)

func (*ForgeJobTaskDef) String

func (x *ForgeJobTaskDef) String() string

func (*ForgeJobTaskDef) UnmarshalJSON

func (x *ForgeJobTaskDef) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ForgeJobTaskDef from JSON.

func (*ForgeJobTaskDef) UnmarshalProtoJSON

func (x *ForgeJobTaskDef) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ForgeJobTaskDef message from JSON.

func (*ForgeJobTaskDef) UnmarshalVT

func (m *ForgeJobTaskDef) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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