Help us shape the future of Go! Take the 2026 Go Developer Survey

v1

package
v0.83.24 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CELEvaluationFailureMessage added in v0.70.0

func CELEvaluationFailureMessage(tenantId uuid.UUID, failures []v1.CELEvaluationFailure) (*msgqueue.Message, error)

func CancelledTaskMessage

func CancelledTaskMessage(
	tenantId uuid.UUID,
	taskId int64,
	taskInsertedAt pgtype.Timestamptz,
	taskExternalId uuid.UUID,
	workflowRunId uuid.UUID,
	retryCount int32,
	eventType sqlcv1.V1EventTypeOlap,
	eventMessage string,
	shouldNotify bool,
) (*msgqueue.Message, error)

func CompletedTaskMessage

func CompletedTaskMessage(
	tenantId uuid.UUID,
	taskId int64,
	taskInsertedAt pgtype.Timestamptz,
	taskExternalId uuid.UUID,
	workflowRunId uuid.UUID,
	retryCount int32,
	output []byte,
) (*msgqueue.Message, error)

func CreatedDAGMessage

func CreatedDAGMessage(tenantId uuid.UUID, dag *v1.DAGWithData) (*msgqueue.Message, error)

func CreatedEventTriggerMessage

func CreatedEventTriggerMessage(tenantId uuid.UUID, eventTriggers CreatedEventTriggerPayload) (*msgqueue.Message, error)

func CreatedTaskMessage

func CreatedTaskMessage(tenantId uuid.UUID, task *v1.V1TaskWithPayload) (*msgqueue.Message, error)

func DurableCallbackCompletedMessage added in v0.80.0

func DurableCallbackCompletedMessage(
	tenantId, taskExternalId uuid.UUID, invocationCount int32, branchId, nodeId int64, payload []byte,
) (*msgqueue.Message, error)

func DurableRestoreTaskMessage added in v0.80.0

func DurableRestoreTaskMessage(tenantId uuid.UUID, taskExternalId uuid.UUID, reason string) (*msgqueue.Message, error)

func FailedTaskMessage

func FailedTaskMessage(
	tenantId uuid.UUID,
	taskId int64,
	taskInsertedAt pgtype.Timestamptz,
	taskExternalId uuid.UUID,
	workflowRunId uuid.UUID,
	retryCount int32,
	isAppError bool,
	errorMsg string,
	isNonRetryable bool,
) (*msgqueue.Message, error)

func MonitoringEventMessageFromActionEvent

func MonitoringEventMessageFromActionEvent(tenantId uuid.UUID, taskId int64, retryCount int32, durableInvocationCount int32, request *contracts.StepActionEvent) (*msgqueue.Message, error)

func MonitoringEventMessageFromInternal

func MonitoringEventMessageFromInternal(tenantId uuid.UUID, payload CreateMonitoringEventPayload) (*msgqueue.Message, error)

func NewCronUpdateMessage added in v0.79.16

func NewCronUpdateMessage(tenantId uuid.UUID, id string) *msgqueue.Message

func NewInternalEventMessage

func NewInternalEventMessage(tenantId uuid.UUID, timestamp time.Time, events ...v1.InternalTaskEvent) (*msgqueue.Message, error)

func NotifyNewConcurrencyStrategy added in v0.78.21

func NotifyNewConcurrencyStrategy(tenantId uuid.UUID, strategyId int64) (*msgqueue.Message, error)

func NotifyNewQueue added in v0.78.21

func NotifyNewQueue(tenantId uuid.UUID, queueName string) (*msgqueue.Message, error)

func NotifyNewWorker added in v0.78.21

func NotifyNewWorker(tenantId uuid.UUID, workerId uuid.UUID) (*msgqueue.Message, error)

func NotifyTaskCreated

func NotifyTaskCreated(tenantId uuid.UUID, tasks []*v1.V1TaskWithPayload) (*msgqueue.Message, error)

func NotifyTaskReleased

func NotifyTaskReleased(tenantId uuid.UUID, tasks []*sqlcv1.ReleaseTasksRow) (*msgqueue.Message, error)

func TriggerTaskMessage

func TriggerTaskMessage(tenantId uuid.UUID, payloads ...*v1.WorkflowNameTriggerOpts) (*msgqueue.Message, error)

Types

type CELEvaluationFailures added in v0.70.0

type CELEvaluationFailures struct {
	Failures []v1.CELEvaluationFailure
}

type CancelTasksPayload

type CancelTasksPayload struct {
	Tasks []v1.TaskIdInsertedAtRetryCount `json:"tasks"`
}

type CancelledTaskPayload

type CancelledTaskPayload struct {
	// (required) the task id
	TaskId int64 `validate:"required"`

	// (required) the task inserted at
	InsertedAt pgtype.Timestamptz

	// (required) the task external id
	ExternalId uuid.UUID

	// (required) the workflow run id
	WorkflowRunId uuid.UUID

	// (required) the retry count
	RetryCount int32

	// (optional) the event message
	EventMessage string

	// (required) the reason for cancellation
	EventType sqlcv1.V1EventTypeOlap

	// (optional) whether the task should notify the worker
	ShouldNotify bool
}

type CandidateFinalizedPayload

type CandidateFinalizedPayload struct {
	// (required) the workflow run id (can either be a workflow run id or single task)
	WorkflowRunId uuid.UUID `validate:"required"`
}

type CheckTenantQueuesPayload

type CheckTenantQueuesPayload struct {
	SlotsReleased bool     `json:"slots_released"`
	QueueNames    []string `json:"queue_name"`
	StrategyIds   []int64  `json:"strategy_ids"`
}

type CompletedTaskPayload

type CompletedTaskPayload struct {
	// (required) the task id
	TaskId int64 `validate:"required"`

	// (required) the task inserted at
	InsertedAt pgtype.Timestamptz

	// (required) the task external id
	ExternalId uuid.UUID

	// (required) the workflow run id
	WorkflowRunId uuid.UUID

	// (required) the retry count
	RetryCount int32

	// (optional) the output data
	Output []byte
}

type CreateMonitoringEventPayload

type CreateMonitoringEventPayload struct {
	TaskId int64 `json:"task_id"`

	RetryCount             int32 `json:"retry_count"`
	DurableInvocationCount int32 `json:"durable_invocation_count"`

	WorkerId *uuid.UUID `json:"worker_id,omitempty"`

	EventType sqlcv1.V1EventTypeOlap `json:"event_type"`

	EventTimestamp time.Time `json:"event_timestamp" validate:"required"`
	EventPayload   string    `json:"event_payload" validate:"required"`
	EventMessage   string    `json:"event_message,omitempty"`
}

type CreatedDAGPayload

type CreatedDAGPayload struct {
	*v1.DAGWithData
}

type CreatedEventTriggerPayload

type CreatedEventTriggerPayload struct {
	Payloads []CreatedEventTriggerPayloadSingleton `json:"payloads"`
}

type CreatedEventTriggerPayloadSingleton

type CreatedEventTriggerPayloadSingleton struct {
	MaybeRunId              *int64     `json:"run_id"`
	MaybeRunInsertedAt      *time.Time `json:"run_inserted_at"`
	MaybeRunExternalId      *uuid.UUID `json:"run_external_id,omitempty"`
	EventSeenAt             time.Time  `json:"event_seen_at"`
	EventKey                string     `json:"event_key"`
	EventExternalId         uuid.UUID  `json:"event_id"`
	EventPayload            []byte     `json:"event_payload"`
	EventAdditionalMetadata []byte     `json:"event_additional_metadata,omitempty"`
	EventScope              *string    `json:"event_scope,omitempty"`
	FilterId                *uuid.UUID `json:"filter_id,omitempty"`
	TriggeringWebhookName   *string    `json:"triggering_webhook_name,omitempty"`
}

type CreatedTaskPayload

type CreatedTaskPayload struct {
	*v1.V1TaskWithPayload
}

type DurableCallbackCompletedPayload added in v0.80.0

type DurableCallbackCompletedPayload struct {
	Payload         []byte
	BranchId        int64
	NodeId          int64
	InvocationCount int32
	TaskExternalId  uuid.UUID
}

type DurableRestoreTaskPayload added in v0.80.0

type DurableRestoreTaskPayload struct {
	Reason         string
	TaskExternalId uuid.UUID
}

type FailedTaskPayload

type FailedTaskPayload struct {
	// (required) the task id
	TaskId int64 `validate:"required"`

	// (required) the task inserted at
	InsertedAt pgtype.Timestamptz

	// (required) the task external id
	ExternalId uuid.UUID

	// (required) the workflow run id
	WorkflowRunId uuid.UUID

	// (required) the retry count
	RetryCount int32

	// (required) whether this is an application-level error or an internal error on the Hatchet side
	IsAppError bool

	// (optional) the error message
	ErrorMsg string

	// (optional) A boolean flag to indicate whether the error is non-retryable, meaning it should _not_ be retried. Defaults to false.
	IsNonRetryable bool `json:"is_non_retryable"`
}

type FailedWebhookValidationPayload added in v0.70.0

type FailedWebhookValidationPayload struct {
	WebhookName string `json:"webhook_name" validate:"required"`
	ErrorText   string `json:"error_text" validate:"required"`
}

type NewConcurrencyStrategyPayload added in v0.78.21

type NewConcurrencyStrategyPayload struct {
	StrategyId int64 `json:"strategy_id"`
}

type NewQueuePayload added in v0.78.21

type NewQueuePayload struct {
	QueueName string `json:"queue_name"`
}

type NewWorkerPayload added in v0.78.21

type NewWorkerPayload struct {
	WorkerId uuid.UUID `json:"worker_id"`
}

type NotifyFinalizedPayload

type NotifyFinalizedPayload struct {
	// (required) the external id (can either be a workflow run id or single task)
	ExternalId uuid.UUID `validate:"required"`

	// (required) the status of the task
	Status sqlcv1.V1ReadableStatusOlap
}

type ReplayTasksPayload

type ReplayTasksPayload struct {
	Tasks []TaskIdInsertedAtRetryCountWithExternalId `json:"tasks"`
}

type SignalTaskCancelledPayload

type SignalTaskCancelledPayload struct {
	// (required) the worker id
	WorkerId uuid.UUID `validate:"required"`

	// (required) the task id
	TaskId int64 `validate:"required"`

	// (required) the task inserted at
	InsertedAt pgtype.Timestamptz

	// (required) the retry count
	RetryCount int32
}

type StreamEventPayload

type StreamEventPayload struct {
	WorkflowRunId uuid.UUID `json:"workflow_run_id" validate:"required"`
	TaskRunId     uuid.UUID `json:"task_run_id" validate:"required"`
	CreatedAt     time.Time `json:"created_at" validate:"required"`
	Payload       []byte    `json:"payload"`
	RetryCount    *int32    `json:"retry_count,omitempty"`
	EventIndex    *int64    `json:"event_index"`
}

type TaskAssignedBulkTaskPayload

type TaskAssignedBulkTaskPayload struct {
	WorkerIdToTaskIds map[uuid.UUID][]int64 `json:"worker_id_to_task_id" validate:"required"`
}

type TaskIdInsertedAtRetryCountWithExternalId

type TaskIdInsertedAtRetryCountWithExternalId struct {
	v1.TaskIdInsertedAtRetryCount `json:"task"`
	WorkflowRunExternalId         uuid.UUID `json:"workflow_run_external_id,omitempty"`
	TaskExternalId                uuid.UUID `json:"task_external_id,omitempty"`
}

type UserEventTaskPayload

type UserEventTaskPayload struct {
	EventExternalId         uuid.UUID `json:"event_id" validate:"required"`
	EventKey                string    `json:"event_key" validate:"required"`
	EventData               []byte    `json:"event_data" validate:"required"`
	EventAdditionalMetadata []byte    `json:"event_additional_metadata"`
	EventPriority           *int32    `json:"event_priority,omitempty"`
	EventScope              *string   `json:"event_scope,omitempty"`
	TriggeringWebhookName   *string   `json:"triggering_webhook_name,omitempty"`

	// WasProcessedLocally indicates whether the event was written and tasks were triggered on the gRPC server
	// instead of the controller, so we can skip the triggering logic downstream
	WasProcessedLocally bool `json:"was_processed_locally"`
}

Jump to

Keyboard shortcuts

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