activecluster

package
v1.3.7-prerelease10 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package activecluster is a generated GoMock package.

Package activecluster is a generated GoMock package.

Index

Constants

View Source
const (
	LookupNewWorkflowOpName                                 = "LookupNewWorkflow"
	LookupWorkflowOpName                                    = "LookupWorkflow"
	GetActiveClusterInfoByClusterAttributeOpName            = "GetActiveClusterInfoByClusterAttribute"
	GetActiveClusterInfoByWorkflowOpName                    = "GetActiveClusterInfoByWorkflow"
	GetActiveClusterSelectionPolicyForWorkflowOpName        = "GetActiveClusterSelectionPolicyForWorkflow"
	GetActiveClusterSelectionPolicyForCurrentWorkflowOpName = "GetActiveClusterSelectionPolicyForCurrentWorkflow"
	DomainIDToDomainFnErrorReason                           = "domain_id_to_name_fn_error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAttributeNotFoundError

type ClusterAttributeNotFoundError struct {
	DomainID         string
	ClusterAttribute *types.ClusterAttribute
}

func (*ClusterAttributeNotFoundError) Error

type DomainIDToDomainFn

type DomainIDToDomainFn func(id string) (*cache.DomainCacheEntry, error)

type ExecutionManagerProvider added in v1.3.2

type ExecutionManagerProvider interface {
	GetExecutionManager(shardID int) (persistence.ExecutionManager, error)
}

type Manager

type Manager interface {
	// GetActiveClusterInfoByClusterAttribute returns the active cluster info by cluster attribute
	// If clusterAttribute is nil, returns the domain-level active cluster info
	// If clusterAttribute is not nil and exists in the domain metadata, returns the active cluster info of the cluster attribute
	// If clusterAttribute is not nil and does not exist in the domain metadata, returns an error
	GetActiveClusterInfoByClusterAttribute(ctx context.Context, domainID string, clusterAttribute *types.ClusterAttribute) (*types.ActiveClusterInfo, error)

	// GetActiveClusterInfoByWorkflow returns the active cluster info by workflow
	// It will first look up the cluster selection policy for the workflow and then get the active cluster info by cluster attribute from the policy
	GetActiveClusterInfoByWorkflow(ctx context.Context, domainID, wfID, rID string) (*types.ActiveClusterInfo, error)

	// GetActiveClusterSelectionPolicyForWorkflow returns the active cluster selection policy for a workflow
	GetActiveClusterSelectionPolicyForWorkflow(ctx context.Context, domainID, wfID, rID string) (*types.ActiveClusterSelectionPolicy, error)

	// GetActiveClusterSelectionPolicyForCurrentWorkflow returns the active cluster selection policy for the current workflow
	// if the workflow is NOT closed, returns policy and true, otherwise returns nil and false
	GetActiveClusterSelectionPolicyForCurrentWorkflow(ctx context.Context, domainID, wfID string) (*types.ActiveClusterSelectionPolicy, bool, error)
}

Manager is the interface for active cluster manager. It is used to get active cluster info by cluster attribute or workflow.

func NewManager

func NewManager(
	domainIDToDomainFn DomainIDToDomainFn,
	metricsCl metrics.Client,
	logger log.Logger,
	executionManagerProvider ExecutionManagerProvider,
	numShards int,
	opts ...ManagerOption,
) (Manager, error)

type ManagerOption added in v1.3.1

type ManagerOption func(*managerImpl)

type MockExecutionManagerProvider added in v1.3.2

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

MockExecutionManagerProvider is a mock of ExecutionManagerProvider interface.

func NewMockExecutionManagerProvider added in v1.3.2

func NewMockExecutionManagerProvider(ctrl *gomock.Controller) *MockExecutionManagerProvider

NewMockExecutionManagerProvider creates a new mock instance.

func (*MockExecutionManagerProvider) EXPECT added in v1.3.2

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

func (*MockExecutionManagerProvider) GetExecutionManager added in v1.3.2

func (m *MockExecutionManagerProvider) GetExecutionManager(shardID int) (persistence.ExecutionManager, error)

GetExecutionManager mocks base method.

type MockExecutionManagerProviderMockRecorder added in v1.3.2

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

MockExecutionManagerProviderMockRecorder is the mock recorder for MockExecutionManagerProvider.

func (*MockExecutionManagerProviderMockRecorder) GetExecutionManager added in v1.3.2

func (mr *MockExecutionManagerProviderMockRecorder) GetExecutionManager(shardID any) *gomock.Call

GetExecutionManager indicates an expected call of GetExecutionManager.

type MockManager

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

MockManager is a mock of Manager interface.

func NewMockManager

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance.

func (*MockManager) EXPECT

func (m *MockManager) EXPECT() *MockManagerMockRecorder

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

func (*MockManager) GetActiveClusterInfoByClusterAttribute

func (m *MockManager) GetActiveClusterInfoByClusterAttribute(ctx context.Context, domainID string, clusterAttribute *types.ClusterAttribute) (*types.ActiveClusterInfo, error)

GetActiveClusterInfoByClusterAttribute mocks base method.

func (*MockManager) GetActiveClusterInfoByWorkflow

func (m *MockManager) GetActiveClusterInfoByWorkflow(ctx context.Context, domainID, wfID, rID string) (*types.ActiveClusterInfo, error)

GetActiveClusterInfoByWorkflow mocks base method.

func (*MockManager) GetActiveClusterSelectionPolicyForCurrentWorkflow

func (m *MockManager) GetActiveClusterSelectionPolicyForCurrentWorkflow(ctx context.Context, domainID, wfID string) (*types.ActiveClusterSelectionPolicy, bool, error)

GetActiveClusterSelectionPolicyForCurrentWorkflow mocks base method.

func (*MockManager) GetActiveClusterSelectionPolicyForWorkflow

func (m *MockManager) GetActiveClusterSelectionPolicyForWorkflow(ctx context.Context, domainID, wfID, rID string) (*types.ActiveClusterSelectionPolicy, error)

GetActiveClusterSelectionPolicyForWorkflow mocks base method.

type MockManagerMockRecorder

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

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) GetActiveClusterInfoByClusterAttribute

func (mr *MockManagerMockRecorder) GetActiveClusterInfoByClusterAttribute(ctx, domainID, clusterAttribute any) *gomock.Call

GetActiveClusterInfoByClusterAttribute indicates an expected call of GetActiveClusterInfoByClusterAttribute.

func (*MockManagerMockRecorder) GetActiveClusterInfoByWorkflow

func (mr *MockManagerMockRecorder) GetActiveClusterInfoByWorkflow(ctx, domainID, wfID, rID any) *gomock.Call

GetActiveClusterInfoByWorkflow indicates an expected call of GetActiveClusterInfoByWorkflow.

func (*MockManagerMockRecorder) GetActiveClusterSelectionPolicyForCurrentWorkflow

func (mr *MockManagerMockRecorder) GetActiveClusterSelectionPolicyForCurrentWorkflow(ctx, domainID, wfID any) *gomock.Call

GetActiveClusterSelectionPolicyForCurrentWorkflow indicates an expected call of GetActiveClusterSelectionPolicyForCurrentWorkflow.

func (*MockManagerMockRecorder) GetActiveClusterSelectionPolicyForWorkflow

func (mr *MockManagerMockRecorder) GetActiveClusterSelectionPolicyForWorkflow(ctx, domainID, wfID, rID any) *gomock.Call

GetActiveClusterSelectionPolicyForWorkflow indicates an expected call of GetActiveClusterSelectionPolicyForWorkflow.

Jump to

Keyboard shortcuts

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