sysworkflow

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Domain is the cadence system workflows domain
	Domain = "cadence-system"
	// DecisionTaskList is the task list that all system workflows share
	DecisionTaskList = "cadsys-decision-tl"
	// SignalName is the name of the cadence signal that system tasks are sent on
	SignalName = "cadsys-signal-sig"
	// WorkflowIDPrefix is the prefix of all system workflow ids
	WorkflowIDPrefix = "cadsys-wf"
	// SignalsUntilContinueAsNew is the number of signals system workflow must receive before continuing as new
	SignalsUntilContinueAsNew = 1000
	// SystemWorkflowScope scope for all metrics emitted by system workflow
	SystemWorkflowScope = "system-workflow"
	// SystemWorkflowIDTag tag for system workflowID
	SystemWorkflowIDTag = "system-workflow-id"
	// HandledSignalCount counter of number of signals processed by system workflow
	HandledSignalCount = "handled-signal"
	// UnknownSignalTypeErr counter of number of unknown signals received by system workflow
	UnknownSignalTypeErr = "unknown-signal-err"
	// ArchivalFailureErr counter of number of archival activity failures
	ArchivalFailureErr = "archival-failure"
	// BackfillFailureErr counter of number of backfill activity failures
	BackfillFailureErr = "backfill-failure"
	// ChannelClosedUnexpectedlyError counter of number of unexpected channel closes in system workflow
	ChannelClosedUnexpectedlyError = "channel-closed-unexpectedly-err"
	// ArchivalActivityFnName name of archival activity function
	ArchivalActivityFnName = "ArchivalActivity"
	// BackfillActivityFnName name of backfill activity function
	BackfillActivityFnName = "BackfillActivity"
	// SystemWorkflowFnName name of system workflow function
	SystemWorkflowFnName = "SystemWorkflow"
	// WorkflowStartToCloseTimeout is the time for the workflow to finish
	WorkflowStartToCloseTimeout = time.Hour * 24 * 30
	// DecisionTaskStartToCloseTimeout is the time for decision to finish
	DecisionTaskStartToCloseTimeout = time.Minute
	// DomainIDTag tag which identifies the domainID of an archived history
	DomainIDTag = "domainID"
	// WorkflowIDTag tag which identifies the workflowID of an archived history
	WorkflowIDTag = "workflowID"
	//RunIDTag tag which identifies the runID of an archived history
	RunIDTag = "runID"
	// BucketNameTag tag which identifies the bucket name
	BucketNameTag = "bucket-name"
)

Variables

This section is empty.

Functions

func ArchivalActivity

func ArchivalActivity(ctx context.Context, request ArchiveRequest) error

ArchivalActivity is the archival activity code

func BackfillActivity

func BackfillActivity(_ context.Context, _ BackfillRequest) error

BackfillActivity is the backfill activity code

func HistoryBlobFilename

func HistoryBlobFilename(domainID string, workflowID string, runID string) string

HistoryBlobFilename constructs name of history file from domainID, workflowID and runID

func SystemWorkflow

func SystemWorkflow(ctx workflow.Context) error

SystemWorkflow is the system workflow code

Types

type ArchivalClient

type ArchivalClient interface {
	Archive(*ArchiveRequest) error
	Backfill(*BackfillRequest) error
}

ArchivalClient is used to archive workflow histories

func NewArchivalClient

func NewArchivalClient(frontendClient frontend.Client, numSWFn dynamicconfig.IntPropertyFn) ArchivalClient

NewArchivalClient creates a new ArchivalClient

type ArchiveRequest

type ArchiveRequest struct {
	DomainName string
	DomainID   string
	WorkflowID string
	RunID      string
	Bucket     string
}

ArchiveRequest is request to Archive

type BackfillRequest

type BackfillRequest struct {
}

BackfillRequest is request to Backfill

type Config

type Config struct{}

Config for SysWorker

type RequestType

type RequestType int

RequestType is the type for signals that can be sent to system workflows

type SysWorker

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

SysWorker is the cadence client worker responsible for running system workflows

func NewSysWorker

func NewSysWorker(frontendClient frontend.Client, scope tally.Scope, blobstoreClient blobstore.Client) *SysWorker

NewSysWorker returns a new SysWorker

func (*SysWorker) Start

func (w *SysWorker) Start() error

Start the SysWorker

func (*SysWorker) Stop

func (w *SysWorker) Stop()

Stop the SysWorker

Jump to

Keyboard shortcuts

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