messages

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 CapacityTickMsg

type CapacityTickMsg struct{}

CapacityTickMsg triggers a capacity report.

type DrainMsg

type DrainMsg struct{}

DrainMsg is a shutdown drain signal.

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 HeartbeatMsg

type HeartbeatMsg struct{}

HeartbeatMsg triggers a periodic heartbeat.

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 OrphanCheckMsg

type OrphanCheckMsg struct{}

OrphanCheckMsg triggers orphan run detection.

type StaleCheckMsg

type StaleCheckMsg struct{}

StaleCheckMsg triggers stale node capacity checks.

type TickMsg

type TickMsg struct{}

TickMsg is a periodic tick for the SchedulerActor.

type TimeoutCheckMsg

type TimeoutCheckMsg struct{}

TimeoutCheckMsg triggers workflow/batch timeout checks.

type WireDispatcherPIDMsg

type WireDispatcherPIDMsg struct {
	PID *actor.PID
}

WireDispatcherPIDMsg delivers the DispatcherActor PID to local actors after singleton activation.

type WireEventBridgePIDMsg

type WireEventBridgePIDMsg struct {
	PID *actor.PID
}

WireEventBridgePIDMsg delivers the EventBridgeActor PID to the WorkerSupervisorActor after local actors are spawned.

type WireOrchestratorPIDMsg

type WireOrchestratorPIDMsg struct {
	PID *actor.PID
}

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.

Jump to

Keyboard shortcuts

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