Documentation
¶
Index ¶
- func DispatchToExecuteMsg(msg *pb.DispatchJobMsg, runID string) *pb.ExecuteJobMsg
- func DomainEventToJobEvent(msg *pb.DomainEventMsg) types.JobEvent
- func ExecuteMsgToWorkContext(msg *pb.ExecuteJobMsg) (jobID, runID, taskType string, payload json.RawMessage, attempt int, ...)
- func JobEventToDomainEvent(event types.JobEvent) *pb.DomainEventMsg
- func JobToDispatchMsg(job *types.Job, attempt int) *pb.DispatchJobMsg
- func WorkerDoneToJobResult(msg *WorkerDoneMsg, nodeID string) *pb.JobResultMsg
- type CapacityTickMsg
- type DrainMsg
- type ExecutionDoneMsg
- type HeartbeatMsg
- type NewJobFromRedisMsg
- type OrphanCheckMsg
- type StaleCheckMsg
- type TickMsg
- type TimeoutCheckMsg
- type WireDispatcherPIDMsg
- type WireEventBridgePIDMsg
- type WireOrchestratorPIDMsg
- type WorkerDoneMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DispatchToExecuteMsg ¶
func DispatchToExecuteMsg(msg *pb.DispatchJobMsg, runID string) *pb.ExecuteJobMsg
DispatchToExecuteMsg converts a DispatchJobMsg to an ExecuteJobMsg, adding the assigned runID for execution tracking.
func DomainEventToJobEvent ¶
func DomainEventToJobEvent(msg *pb.DomainEventMsg) types.JobEvent
DomainEventToJobEvent converts a proto DomainEventMsg back to a domain JobEvent.
func ExecuteMsgToWorkContext ¶
func ExecuteMsgToWorkContext(msg *pb.ExecuteJobMsg) (jobID, runID, taskType string, payload json.RawMessage, attempt int, priority int, headers map[string]string, deadline time.Time)
ExecuteMsgToWorkContext extracts execution context fields from a proto ExecuteJobMsg.
func JobEventToDomainEvent ¶
func JobEventToDomainEvent(event types.JobEvent) *pb.DomainEventMsg
JobEventToDomainEvent converts a domain JobEvent to a proto DomainEventMsg.
func JobToDispatchMsg ¶
func JobToDispatchMsg(job *types.Job, attempt int) *pb.DispatchJobMsg
JobToDispatchMsg converts a domain Job to a DispatchJobMsg for sending from the SchedulerActor/NotifierActor to the DispatcherActor.
func WorkerDoneToJobResult ¶
func WorkerDoneToJobResult(msg *WorkerDoneMsg, nodeID string) *pb.JobResultMsg
WorkerDoneToJobResult converts a local WorkerDoneMsg to a proto JobResultMsg for sending across node boundaries.
Types ¶
type ExecutionDoneMsg ¶
type ExecutionDoneMsg struct {
Success bool `json:"success"`
Error string `json:"error,omitempty"`
Output json.RawMessage `json:"output,omitempty"`
}
ExecutionDoneMsg is the result from a handler goroutine.
type NewJobFromRedisMsg ¶
type NewJobFromRedisMsg struct {
JobID string `json:"job_id"`
TaskType string `json:"task_type"`
Priority int `json:"priority"`
}
NewJobFromRedisMsg is delivered from the Redis Pub/Sub subscriber goroutine.
type TimeoutCheckMsg ¶
type TimeoutCheckMsg struct{}
TimeoutCheckMsg triggers workflow/batch timeout checks.
type WireDispatcherPIDMsg ¶
WireDispatcherPIDMsg delivers the DispatcherActor PID to local actors after singleton activation.
type WireEventBridgePIDMsg ¶
WireEventBridgePIDMsg delivers the EventBridgeActor PID to the WorkerSupervisorActor after local actors are spawned.
type WireOrchestratorPIDMsg ¶
WireOrchestratorPIDMsg delivers the OrchestratorActor PID to the EventBridgeActor after singleton activation.
type WorkerDoneMsg ¶
type WorkerDoneMsg struct {
RunID string `json:"run_id"`
JobID string `json:"job_id"`
TaskType string `json:"task_type"`
Success bool `json:"success"`
Error string `json:"error,omitempty"`
Output json.RawMessage `json:"output,omitempty"`
Attempt int `json:"attempt"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
WorkflowID string `json:"workflow_id,omitempty"`
BatchID string `json:"batch_id,omitempty"`
NodeID string `json:"node_id,omitempty"`
// Run carries the complete terminal run record for batched completion.
// Local-only; not serialized across node boundaries.
Run *types.JobRun `json:"-"`
}
WorkerDoneMsg is the completion report from a child worker actor.