Back to / service / worker / parentclosepolicy

Package parentclosepolicy

Latest Go to latest

The latest major version is .

Published: 5 days ago | License: MIT | Module:


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

type BootstrapParams

type BootstrapParams struct {
	// Config contains the configuration for scanner
	// ServiceClient is an instance of cadence service client
	ServiceClient workflowserviceclient.Interface
	// MetricsClient is an instance of metrics object for emitting stats
	MetricsClient metrics.Client
	Logger        log.Logger
	// TallyScope is an instance of tally metrics scope
	TallyScope tally.Scope
	// ClientBean is an instance of client.Bean for a collection of clients
	ClientBean client.Bean

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

type Client

type Client interface {
	SendParentClosePolicyRequest(Request) error

Client is used to send request to processor workflow

func NewClient

func NewClient(
	metricsClient metrics.Client,
	logger log.Logger,
	publicClient workflowserviceclient.Interface,
	numWorkflows int,
) Client

NewClient creates a new Client

type ClientMock

type ClientMock struct {

ClientMock is an autogenerated mock type for the Client type

func (*ClientMock) SendParentClosePolicyRequest

func (_m *ClientMock) SendParentClosePolicyRequest(_a0 Request) error

SendParentClosePolicyRequest provides a mock function with given fields: _a0, _a1

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 {
	Executions []RequestDetail
	DomainName string
	DomainUUID string

Request defines the request for parent close policy

type RequestDetail

type RequestDetail struct {
	WorkflowID string
	RunID      string
	Policy     shared.ParentClosePolicy

RequestDetail defines detail of each workflow to process

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier