workflows

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventsWorkflow        = "events_workflow"
	SchedulerWorkflow     = "scheduler_workflow"
	TaskQueueName         = "events-task-queue"
	ScheduleTaskQueueName = "schedule-task-queue"

	DispatcherWorkerID = "dispatcher-worker"
	SchedulerWorkerID  = "scheduler-worker"
)

Variables

This section is empty.

Functions

func CreateSessionsForWorkflow

func CreateSessionsForWorkflow(event sdktypes.Event, sessionsData []SessionData) ([]*sdktypes.Session, error)

used by both dispatcher and scheduler

Types

type Services

type Services struct {
	fx.In

	Connections  sdkservices.Connections
	Deployments  sdkservices.Deployments
	Events       sdkservices.Events
	Integrations sdkservices.Integrations
	Projects     sdkservices.Projects
	Triggers     sdkservices.Triggers
	Sessions     sdkservices.Sessions
	Envs         sdkservices.Envs
}

type SessionData

type SessionData struct {
	Deployment            sdktypes.Deployment
	CodeLocation          sdktypes.CodeLocation
	Trigger               sdktypes.Trigger
	AdditionalTriggerData map[string]sdktypes.Value
}

type Workflow

type Workflow struct {
	Z        *zap.Logger
	Services Services
	Tmprl    temporalclient.Client
}

func (*Workflow) CreateEventRecord

func (wf *Workflow) CreateEventRecord(ctx context.Context, eventID sdktypes.EventID, state sdktypes.EventState)

func (*Workflow) StartSessions

func (wf *Workflow) StartSessions(ctx workflow.Context, event sdktypes.Event, sessionsData []SessionData) error

Jump to

Keyboard shortcuts

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