executions

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHistoryEventIDValidator added in v1.5.7

func NewHistoryEventIDValidator(
	shardID int32,
	executionManager persistence.ExecutionManager,
	historyManager persistence.HistoryManager,
) *historyEventIDValidator

NewEventIDValidator returns new instance.

func NewMutableStateIDValidator added in v1.5.7

func NewMutableStateIDValidator() *mutableStateIDValidator

NewMutableStateIDValidator returns new instance.

Types

type MutableState added in v1.5.7

type MutableState struct {
	*persistencespb.WorkflowMutableState
}

type MutableStateValidationResult added in v1.5.7

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

type Scavenger

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

Scavenger is the type that holds the state for executions scavenger daemon

func NewScavenger

func NewScavenger(
	numHistoryShards int32,
	execMgrFactory persistence.ExecutionManagerFactory,
	historyManager persistence.HistoryManager,
	metricsClient metrics.Client,
	logger log.Logger,
) *Scavenger

NewScavenger returns an instance of executions scavenger daemon The Scavenger can be started by calling the Start() method on the returned object. Calling the Start() method will result in one complete iteration over all of the open workflow executions in the system. For each executions, will attempt to validate the workflow execution and emit metrics/logs on validation failures.

The scavenger will retry on all persistence errors infinitely and will only stop under two conditions

  • either all executions are processed successfully (or)
  • Stop() method is called to stop the scavenger

func (*Scavenger) Alive

func (s *Scavenger) Alive() bool

Alive returns true if the scavenger is still running

func (*Scavenger) Start

func (s *Scavenger) Start()

Start starts the scavenger

func (*Scavenger) Stop

func (s *Scavenger) Stop()

Stop stops the scavenger

type Validator added in v1.5.7

type Validator interface {
	Validate(mutableState *MutableState) ([]MutableStateValidationResult, error)
}

Jump to

Keyboard shortcuts

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