parentclosepolicy

package
v1.26.2-122.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package parentclosepolicy is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessorActivity

func ProcessorActivity(ctx context.Context, request Request) error

ProcessorActivity is activity for processing batch operation

func ProcessorWorkflow

func ProcessorWorkflow(ctx workflow.Context) error

ProcessorWorkflow is the workflow that performs actions for ParentClosePolicy

Types

type BootstrapParams

type BootstrapParams struct {
	SdkClientFactory sdk.ClientFactory
	// MetricsHandler is an instance of metrics object for emitting stats
	MetricsHandler metrics.Handler
	// Logger is the logger
	Logger log.Logger
	// Config contains the configuration for scanner
	Config Config
	// ClientBean is an instance of client.Bean for a collection of clients
	ClientBean client.Bean
	// CurrentCluster is the name of current cluster
	CurrentCluster string
}

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

type Client

type Client interface {
	SendParentClosePolicyRequest(context.Context, Request) error
}

Client is used to send request to processor workflow

func NewClient

func NewClient(
	metricsHandler metrics.Handler,
	logger log.Logger,
	sdkClientFactory sdk.ClientFactory,
	numWorkflows int,
) Client

NewClient creates a new Client

type Config added in v1.12.0

type Config struct {
	MaxConcurrentActivityExecutionSize     dynamicconfig.IntPropertyFn
	MaxConcurrentWorkflowTaskExecutionSize dynamicconfig.IntPropertyFn
	MaxConcurrentActivityTaskPollers       dynamicconfig.IntPropertyFn
	MaxConcurrentWorkflowTaskPollers       dynamicconfig.IntPropertyFn
	NumParentClosePolicySystemWorkflows    dynamicconfig.IntPropertyFn
}

Config defines the configuration for parent close policy worker

type MockClient added in v1.5.7

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

MockClient is a mock of Client interface.

func NewMockClient added in v1.5.7

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) EXPECT added in v1.5.7

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) SendParentClosePolicyRequest added in v1.5.7

func (m *MockClient) SendParentClosePolicyRequest(arg0 context.Context, arg1 Request) error

SendParentClosePolicyRequest mocks base method.

type MockClientMockRecorder added in v1.5.7

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

MockClientMockRecorder is the mock recorder for MockClient.

func (*MockClientMockRecorder) SendParentClosePolicyRequest added in v1.5.7

func (mr *MockClientMockRecorder) SendParentClosePolicyRequest(arg0, arg1 any) *gomock.Call

SendParentClosePolicyRequest indicates an expected call of SendParentClosePolicyRequest.

type Processor

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

Processor is the background sub-system that execute workflow for ParentClosePolicy

func New

func New(params *BootstrapParams) *Processor

New returns a new instance as daemon

func (*Processor) Start

func (s *Processor) Start() error

Start starts the scanner

type Request

type Request struct {
	ParentExecution *commonpb.WorkflowExecution
	Executions      []RequestDetail
}

Request defines the request for parent close policy

type RequestDetail

type RequestDetail struct {
	Namespace   string
	NamespaceID string
	WorkflowID  string
	RunID       string
	Policy      enumspb.ParentClosePolicy
}

RequestDetail defines detail of each workflow to process

Jump to

Keyboard shortcuts

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