scanner

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDataCorruptionWorkflow added in v0.24.0

func CheckDataCorruptionWorkflow(ctx workflow.Context, fixList []entity.Execution) error

CheckDataCorruptionWorkflow is invoked by remote cluster via signals

func EmitResultMetricsActivity added in v0.24.0

func EmitResultMetricsActivity(ctx context.Context, fixResults []invariant.FixResult) error

func ExecutionFixerActivity added in v0.24.0

func ExecutionFixerActivity(ctx context.Context, fixList []entity.Execution) ([]invariant.FixResult, error)

func HistoryScannerWorkflow added in v0.9.3

func HistoryScannerWorkflow(
	ctx workflow.Context,
) error

HistoryScannerWorkflow is the workflow that runs the history scanner background daemon

func HistoryScavengerActivity added in v0.9.3

func HistoryScavengerActivity(
	activityCtx context.Context,
) (history.ScavengerHeartbeatDetails, error)

HistoryScavengerActivity is the activity that runs history scavenger

func NewScannerContext added in v0.18.1

func NewScannerContext(ctx context.Context, workflowName string, scannerContext scannerContext) context.Context

NewScannerContext provides context to be used as background activity context it uses typed, private key to reduce access scope

func TaskListScannerWorkflow

func TaskListScannerWorkflow(
	ctx workflow.Context,
) error

TaskListScannerWorkflow is the workflow that runs the task-list scanner background daemon

func TaskListScavengerActivity

func TaskListScavengerActivity(
	activityCtx context.Context,
) error

TaskListScavengerActivity is the activity that runs task list scavenger

Types

type BootstrapParams

type BootstrapParams struct {
	// Config contains the configuration for scanner
	Config Config
	// TallyScope is an instance of tally metrics scope
	TallyScope tally.Scope
}

BootstrapParams contains the set of params needed to bootstrap the scanner sub-system

type Config

type Config struct {
	// ScannerPersistenceMaxQPS the max rate of calls to persistence
	// Right now is being used by historyScanner to determine the rate of persistence API calls
	ScannerPersistenceMaxQPS dynamicconfig.IntPropertyFn
	// TaskListScannerEnabled indicates if taskList scanner should be started as part of scanner
	TaskListScannerEnabled dynamicconfig.BoolPropertyFn
	// TaskListScannerOptions contains options for TaskListScanner
	TaskListScannerOptions tasklist.Options
	// Persistence contains the persistence configuration
	Persistence *config.Persistence
	// ClusterMetadata contains the metadata for this cluster
	ClusterMetadata cluster.Metadata
	// HistoryScannerEnabled indicates if history scanner should be started as part of scanner
	HistoryScannerEnabled dynamicconfig.BoolPropertyFn
	// ShardScanners is a list of shard scanner configs
	ShardScanners              []*shardscanner.ScannerConfig
	MaxWorkflowRetentionInDays dynamicconfig.IntPropertyFn
}

Config defines the configuration for scanner

type Scanner

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

Scanner is the background sub-system that does full scans of database tables to cleanup resources, monitor anomalies and emit stats for analytics

func New

func New(
	resource resource.Resource,
	params *BootstrapParams,
) *Scanner

New returns a new instance of scanner daemon Scanner is the background sub-system that does full scans of database tables in an attempt to cleanup resources, monitor system anamolies and emit stats for analysis and alerting

func NewDataCorruptionWorkflowWorker added in v0.24.0

func NewDataCorruptionWorkflowWorker(
	resource resource.Resource,
	params *BootstrapParams,
) *Scanner

func (*Scanner) Start

func (s *Scanner) Start() error

Start starts the scanner

func (*Scanner) StartDataCorruptionWorkflowWorker added in v0.24.0

func (s *Scanner) StartDataCorruptionWorkflowWorker() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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