services

package
v1.0.215 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEmbargo added in v1.0.215

func WithEmbargo(embargo int) *publishEmbargoOption

Types

type CompleteActivityProcessorFunc added in v1.0.215

type CompleteActivityProcessorFunc func(ctx context.Context, activity *model.WorkflowState) error

type CompleteJobProcessorFunc

type CompleteJobProcessorFunc func(ctx context.Context, job *model.WorkflowState) error

type EventProcessorFunc

type EventProcessorFunc func(ctx context.Context, newActivityID string, traversal *model.WorkflowState, traverseOnly bool) error

type LaunchFunc added in v1.0.215

type LaunchFunc func(ctx context.Context, state *model.WorkflowState) error

type MessageCompleteProcessorFunc

type MessageCompleteProcessorFunc func(ctx context.Context, state *model.WorkflowState) error

type NatsService

type NatsService struct {
	// contains filtered or unexported fields
}

func NewNatsService

func NewNatsService(log *zap.Logger, conn common.NatsConn, txConn common.NatsConn, storageType nats.StorageType, concurrency int) (*NatsService, error)

func (*NatsService) AwaitMsg

func (s *NatsService) AwaitMsg(ctx context.Context, state *model.WorkflowState) error

func (*NatsService) CloseUserTask added in v0.1.86

func (s *NatsService) CloseUserTask(ctx context.Context, trackingID string) error

func (*NatsService) Conn

func (s *NatsService) Conn() common.NatsConn

func (*NatsService) CreateJob

func (s *NatsService) CreateJob(ctx context.Context, job *model.WorkflowState) (string, error)

func (*NatsService) CreateWorkflowInstance

func (s *NatsService) CreateWorkflowInstance(ctx context.Context, wfInstance *model.WorkflowInstance) (*model.WorkflowInstance, error)

func (*NatsService) DeleteJob added in v1.0.215

func (s *NatsService) DeleteJob(_ context.Context, trackingID string) error

func (*NatsService) DestroyWorkflowInstance

func (s *NatsService) DestroyWorkflowInstance(ctx context.Context, workflowInstanceId string, state model.CancellationState, wfError *model.Error) error

func (*NatsService) GetElement added in v0.1.175

func (s *NatsService) GetElement(_ context.Context, state *model.WorkflowState) (*model.Element, error)

func (*NatsService) GetJob

func (s *NatsService) GetJob(_ context.Context, trackingID string) (*model.WorkflowState, error)

func (*NatsService) GetLatestVersion

func (s *NatsService) GetLatestVersion(_ context.Context, workflowName string) (string, error)

GetLatestVersion queries the workflow versions table for the latest entry

func (*NatsService) GetMessageSenderRoutingKey added in v0.1.167

func (s *NatsService) GetMessageSenderRoutingKey(workflowName string, messageName string) (string, error)

func (*NatsService) GetOldState added in v1.0.215

func (s *NatsService) GetOldState(id string) (*model.WorkflowState, error)

func (*NatsService) GetServiceTaskRoutingKey added in v0.1.167

func (s *NatsService) GetServiceTaskRoutingKey(taskName string) (string, error)

func (*NatsService) GetUserTaskIDs added in v0.1.86

func (s *NatsService) GetUserTaskIDs(owner string) (*model.UserTasks, error)

func (*NatsService) GetWorkflow

func (s *NatsService) GetWorkflow(_ context.Context, workflowId string) (*model.Workflow, error)

func (*NatsService) GetWorkflowInstance

func (s *NatsService) GetWorkflowInstance(_ context.Context, workflowInstanceId string) (*model.WorkflowInstance, error)

func (*NatsService) GetWorkflowInstanceStatus

func (s *NatsService) GetWorkflowInstanceStatus(_ context.Context, id string) (*model.WorkflowInstanceStatus, error)

func (*NatsService) ListWorkflowInstance

func (s *NatsService) ListWorkflowInstance(_ context.Context, workflowName string) (chan *model.ListWorkflowInstanceResult, chan error)

func (*NatsService) ListWorkflows

func (s *NatsService) ListWorkflows(_ context.Context) (chan *model.ListWorkflowResult, chan error)

func (*NatsService) OwnerId added in v0.1.86

func (s *NatsService) OwnerId(name string) (string, error)

func (*NatsService) OwnerName added in v0.1.86

func (s *NatsService) OwnerName(id string) (string, error)

func (*NatsService) PublishMessage

func (s *NatsService) PublishMessage(ctx context.Context, workflowInstanceID string, name string, key string, vars []byte) error

func (*NatsService) PublishWorkflowState

func (s *NatsService) PublishWorkflowState(ctx context.Context, stateName string, state *model.WorkflowState, opts ...PublishOpt) error

func (*NatsService) SetCompleteActivityProcessor added in v1.0.215

func (s *NatsService) SetCompleteActivityProcessor(processor CompleteActivityProcessorFunc)

func (*NatsService) SetCompleteJobProcessor

func (s *NatsService) SetCompleteJobProcessor(processor CompleteJobProcessorFunc)

func (*NatsService) SetEventProcessor

func (s *NatsService) SetEventProcessor(processor EventProcessorFunc)

func (*NatsService) SetLaunchFunc added in v1.0.215

func (s *NatsService) SetLaunchFunc(processor LaunchFunc)

func (*NatsService) SetMessageCompleteProcessor

func (s *NatsService) SetMessageCompleteProcessor(processor MessageCompleteProcessorFunc)

func (*NatsService) SetTraversalProvider added in v0.1.181

func (s *NatsService) SetTraversalProvider(provider TraversalFunc)

func (*NatsService) Shutdown

func (s *NatsService) Shutdown()

func (*NatsService) StartProcessing

func (s *NatsService) StartProcessing(ctx context.Context) error

func (*NatsService) StoreWorkflow

func (s *NatsService) StoreWorkflow(ctx context.Context, wf *model.Workflow) (string, error)

func (*NatsService) WorkflowStats added in v0.1.134

func (s *NatsService) WorkflowStats() *model.WorkflowStats

type PublishOpt added in v1.0.215

type PublishOpt interface {
	Apply(n *publishOptions)
}

type TraversalFunc added in v0.1.181

type TraversalFunc func(ctx context.Context, wfi *model.WorkflowInstance, trackingId common.TrackingID, outbound *model.Targets, el map[string]*model.Element, v []byte) error

Jump to

Keyboard shortcuts

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