executions

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConcreteExecutionsScannerWFTypeName defines workflow type name for concrete executions scanner
	ConcreteExecutionsScannerWFTypeName = "cadence-sys-executions-scanner-workflow"

	// ConcreteExecutionsFixerWFTypeName defines workflow type name for concrete executions fixer
	ConcreteExecutionsFixerWFTypeName = "cadence-sys-executions-fixer-workflow"
)
View Source
const (

	// CurrentExecutionsScannerWFTypeName is the current execution scanner workflow type
	CurrentExecutionsScannerWFTypeName = "cadence-sys-current-executions-scanner-workflow"
	// CurrentExecutionsScannerTaskListName is the current execution scanner workflow tasklist
	CurrentExecutionsScannerTaskListName = "cadence-sys-current-executions-scanner-tasklist-0"

	// CurrentExecutionsFixerWFTypeName is the current execution fixer workflow ID
	CurrentExecutionsFixerWFTypeName = "cadence-sys-current-executions-fixer-workflow"

	// CurrentExecutionsFixerTaskListName is the current execution fixer workflow tasklist
	CurrentExecutionsFixerTaskListName = "cadence-sys-current-executions-fixer-tasklist-0"
)

Variables

This section is empty.

Functions

func ConcreteExecutionConfig added in v0.18.0

func ConcreteExecutionConfig(ctx shardscanner.Context) shardscanner.CustomScannerConfig

ConcreteExecutionConfig resolves dynamic config for concrete executions scanner.

func ConcreteExecutionFixerHooks added in v0.18.0

func ConcreteExecutionFixerHooks() *shardscanner.FixerHooks

ConcreteExecutionFixerHooks provides hooks needed for concrete executions fixer.

func ConcreteExecutionHooks added in v0.18.0

func ConcreteExecutionHooks() *shardscanner.ScannerHooks

ConcreteExecutionHooks provides hooks for concrete executions scanner

func ConcreteExecutionScannerConfig added in v0.18.0

func ConcreteExecutionScannerConfig(dc *dynamicconfig.Collection) *shardscanner.ScannerConfig

ConcreteExecutionScannerConfig configures concrete execution scanner

func ConcreteFixerWorkflow added in v0.18.0

func ConcreteFixerWorkflow(
	ctx workflow.Context,
	params shardscanner.FixerWorkflowParams,
) error

ConcreteFixerWorkflow starts concrete executions fixer.

func ConcreteScannerWorkflow added in v0.18.0

func ConcreteScannerWorkflow(ctx workflow.Context, params shardscanner.ScannerWorkflowParams) error

ConcreteScannerWorkflow starts concrete executions scanner.

func CurrentExecutionConfig added in v0.18.0

func CurrentExecutionConfig(ctx shardscanner.Context) shardscanner.CustomScannerConfig

CurrentExecutionConfig resolves dynamic config for current executions scanner.

func CurrentExecutionFixerHooks added in v0.18.0

func CurrentExecutionFixerHooks() *shardscanner.FixerHooks

CurrentExecutionFixerHooks provides hooks for current executions fixer.

func CurrentExecutionFixerIterator added in v0.18.0

func CurrentExecutionFixerIterator(
	ctx context.Context,
	client blobstore.Client,
	keys store.Keys,
	_ shardscanner.FixShardActivityParams,
) store.ScanOutputIterator

CurrentExecutionFixerIterator is the iterator of fixer execution

func CurrentExecutionIterator added in v0.18.0

func CurrentExecutionIterator(
	ctx context.Context,
	pr persistence.Retryer,
	params shardscanner.ScanShardActivityParams,
) pagination.Iterator

CurrentExecutionIterator is the iterator of current executions

func CurrentExecutionManager added in v0.18.0

func CurrentExecutionManager(
	ctx context.Context,
	pr persistence.Retryer,
	params shardscanner.ScanShardActivityParams,
) invariant.Manager

CurrentExecutionManager is the current execution scanner manager

func CurrentExecutionScannerConfig added in v0.18.0

func CurrentExecutionScannerConfig(dc *dynamicconfig.Collection) *shardscanner.ScannerConfig

CurrentExecutionScannerConfig configures current execution scanner

func CurrentExecutionsHooks added in v0.18.0

func CurrentExecutionsHooks() *shardscanner.ScannerHooks

CurrentExecutionsHooks provides hooks for current executions scanner.

func CurrentFixerWorkflow added in v0.18.0

func CurrentFixerWorkflow(
	ctx workflow.Context,
	params shardscanner.FixerWorkflowParams,
) error

CurrentFixerWorkflow starts current executions fixer.

func CurrentScannerWorkflow added in v0.18.0

func CurrentScannerWorkflow(
	ctx workflow.Context,
	params shardscanner.ScannerWorkflowParams,
) error

CurrentScannerWorkflow is the workflow that scans over all current executions

func FixerIterator added in v0.18.0

FixerIterator provides iterator for concrete execution fixer.

func FixerManager added in v0.18.0

FixerManager provides invariant manager for concrete execution fixer.

func ParseCollections added in v0.18.0

func ParseCollections(params shardscanner.CustomScannerConfig) []invariant.Collection

ParseCollections converts string based map to list of collections

func ScanTypeStrings added in v0.16.0

func ScanTypeStrings() []string

ScanTypeStrings returns a slice of all String values of the enum

func ScannerIterator added in v0.18.0

ScannerIterator provides iterator for concrete execution scanner.

func ScannerManager added in v0.18.0

ScannerManager provides invariant manager for concrete execution scanner

Types

type ExecutionFetcher added in v0.16.0

type ExecutionFetcher func(ctx context.Context, retryer persistence.Retryer, request fetcher.ExecutionRequest) (entity.Entity, error)

ExecutionFetcher represents a function which returns specific execution entity

type InvariantFactory added in v0.16.0

type InvariantFactory func(retryer persistence.Retryer) invariant.Invariant

InvariantFactory represents a function which returns Invariant

type ScanType added in v0.16.0

type ScanType int

ScanType is the enum for representing different entity types to scan

const (
	// ConcreteExecutionType concrete execution entity
	ConcreteExecutionType ScanType = iota
	// CurrentExecutionType current execution entity
	CurrentExecutionType
)

func ScanTypeString added in v0.16.0

func ScanTypeString(s string) (ScanType, error)

ScanTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ScanTypeValues added in v0.16.0

func ScanTypeValues() []ScanType

ScanTypeValues returns all values of the enum

func (ScanType) IsAScanType added in v0.16.0

func (i ScanType) IsAScanType() bool

IsAScanType returns "true" if the value is listed in the enum definition. "false" otherwise

func (ScanType) String added in v0.16.0

func (i ScanType) String() string

func (ScanType) ToBlobstoreEntity added in v0.16.0

func (st ScanType) ToBlobstoreEntity() entity.Entity

ToBlobstoreEntity picks struct depending on scanner type.

func (ScanType) ToExecutionFetcher added in v0.16.0

func (st ScanType) ToExecutionFetcher() ExecutionFetcher

ToExecutionFetcher selects appropriate execution fetcher. Fetcher returns single execution entity. It will panic if scan type is unknown.

func (ScanType) ToInvariants added in v0.16.0

func (st ScanType) ToInvariants(collections []invariant.Collection) []InvariantFactory

ToInvariants returns list of invariants to be checked depending on scan type.

func (ScanType) ToIterator added in v0.16.0

func (st ScanType) ToIterator() func(ctx context.Context, retryer persistence.Retryer, pageSize int) pagination.Iterator

ToIterator selects appropriate iterator. It will panic if scan type is unknown.

Jump to

Keyboard shortcuts

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