client

package
v1.32.1-x.5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Package client is a generated GoMock package.

Package client is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bean

type Bean interface {
	GetHistoryClient() historyservice.HistoryServiceClient
	GetMatchingClient(namespaceIDToName NamespaceIDToNameFunc) (matchingservice.MatchingServiceClient, error)
	GetFrontendClient() workflowservice.WorkflowServiceClient
	GetRemoteAdminClient(string) (adminservice.AdminServiceClient, error)
	GetRemoteFrontendClient(string) (grpc.ClientConnInterface, workflowservice.WorkflowServiceClient, error)
	// Close deterministically releases bean-held resources on shutdown: it
	// stops the history and matching clients (their daemon goroutines and
	// cached gRPC connections) and unregisters the cluster metadata change
	// callback.
	Close()
}

Bean is a collection of clients

func NewClientBean

func NewClientBean(factory Factory, clusterMetadata cluster.Metadata) (Bean, error)

NewClientBean provides a collection of clients

type Factory

type Factory interface {
	NewHistoryClientWithTimeout(timeout time.Duration) (historyservice.HistoryServiceClient, error)
	NewMatchingClientWithTimeout(namespaceIDToName NamespaceIDToNameFunc, timeout time.Duration, longPollTimeout time.Duration) (matchingservice.MatchingServiceClient, error)
	NewRemoteFrontendClientWithTimeout(rpcAddress string, timeout time.Duration, longPollTimeout time.Duration) (grpc.ClientConnInterface, workflowservice.WorkflowServiceClient)
	NewLocalFrontendClientWithTimeout(timeout time.Duration, longPollTimeout time.Duration) (grpc.ClientConnInterface, workflowservice.WorkflowServiceClient, error)
	NewRemoteAdminClientWithTimeout(rpcAddress string, timeout time.Duration, largeTimeout time.Duration) adminservice.AdminServiceClient
	NewLocalAdminClientWithTimeout(timeout time.Duration, largeTimeout time.Duration) (adminservice.AdminServiceClient, error)
	NewRemoteOperatorClientWithTimeout(rpcAddress string, timeout time.Duration) operatorservice.OperatorServiceClient
	NewLocalOperatorClientWithTimeout(timeout time.Duration) (operatorservice.OperatorServiceClient, error)
}

Factory can be used to create RPC clients for temporal services

type FactoryProvider

type FactoryProvider interface {
	NewFactory(
		rpcFactory common.RPCFactory,
		monitor membership.Monitor,
		metricsHandler metrics.Handler,
		dc *dynamicconfig.Collection,
		testHooks testhooks.TestHooks,
		numberOfHistoryShards int32,
		logger log.Logger,
		throttledLogger log.Logger,
	) Factory
}

FactoryProvider can be used to provide a customized client Factory implementation.

func NewFactoryProvider

func NewFactoryProvider() FactoryProvider

NewFactoryProvider creates a default implementation of FactoryProvider.

type MockBean

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

MockBean is a mock of Bean interface.

func NewMockBean

func NewMockBean(ctrl *gomock.Controller) *MockBean

NewMockBean creates a new mock instance.

func (*MockBean) Close

func (m *MockBean) Close()

Close mocks base method.

func (*MockBean) EXPECT

func (m *MockBean) EXPECT() *MockBeanMockRecorder

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

func (*MockBean) GetFrontendClient

func (m *MockBean) GetFrontendClient() workflowservice.WorkflowServiceClient

GetFrontendClient mocks base method.

func (*MockBean) GetHistoryClient

func (m *MockBean) GetHistoryClient() historyservice.HistoryServiceClient

GetHistoryClient mocks base method.

func (*MockBean) GetMatchingClient

func (m *MockBean) GetMatchingClient(namespaceIDToName NamespaceIDToNameFunc) (matchingservice.MatchingServiceClient, error)

GetMatchingClient mocks base method.

func (*MockBean) GetRemoteAdminClient

func (m *MockBean) GetRemoteAdminClient(arg0 string) (adminservice.AdminServiceClient, error)

GetRemoteAdminClient mocks base method.

func (*MockBean) GetRemoteFrontendClient

func (m *MockBean) GetRemoteFrontendClient(arg0 string) (grpc.ClientConnInterface, workflowservice.WorkflowServiceClient, error)

GetRemoteFrontendClient mocks base method.

type MockBeanMockRecorder

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

MockBeanMockRecorder is the mock recorder for MockBean.

func (*MockBeanMockRecorder) Close

func (mr *MockBeanMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockBeanMockRecorder) GetFrontendClient

func (mr *MockBeanMockRecorder) GetFrontendClient() *gomock.Call

GetFrontendClient indicates an expected call of GetFrontendClient.

func (*MockBeanMockRecorder) GetHistoryClient

func (mr *MockBeanMockRecorder) GetHistoryClient() *gomock.Call

GetHistoryClient indicates an expected call of GetHistoryClient.

func (*MockBeanMockRecorder) GetMatchingClient

func (mr *MockBeanMockRecorder) GetMatchingClient(namespaceIDToName any) *gomock.Call

GetMatchingClient indicates an expected call of GetMatchingClient.

func (*MockBeanMockRecorder) GetRemoteAdminClient

func (mr *MockBeanMockRecorder) GetRemoteAdminClient(arg0 any) *gomock.Call

GetRemoteAdminClient indicates an expected call of GetRemoteAdminClient.

func (*MockBeanMockRecorder) GetRemoteFrontendClient

func (mr *MockBeanMockRecorder) GetRemoteFrontendClient(arg0 any) *gomock.Call

GetRemoteFrontendClient indicates an expected call of GetRemoteFrontendClient.

type MockFactory

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

MockFactory is a mock of Factory interface.

func NewMockFactory

func NewMockFactory(ctrl *gomock.Controller) *MockFactory

NewMockFactory creates a new mock instance.

func (*MockFactory) EXPECT

func (m *MockFactory) EXPECT() *MockFactoryMockRecorder

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

func (*MockFactory) NewHistoryClientWithTimeout

func (m *MockFactory) NewHistoryClientWithTimeout(timeout time.Duration) (historyservice.HistoryServiceClient, error)

NewHistoryClientWithTimeout mocks base method.

func (*MockFactory) NewLocalAdminClientWithTimeout

func (m *MockFactory) NewLocalAdminClientWithTimeout(timeout, largeTimeout time.Duration) (adminservice.AdminServiceClient, error)

NewLocalAdminClientWithTimeout mocks base method.

func (*MockFactory) NewLocalFrontendClientWithTimeout

func (m *MockFactory) NewLocalFrontendClientWithTimeout(timeout, longPollTimeout time.Duration) (grpc.ClientConnInterface, workflowservice.WorkflowServiceClient, error)

NewLocalFrontendClientWithTimeout mocks base method.

func (*MockFactory) NewLocalOperatorClientWithTimeout

func (m *MockFactory) NewLocalOperatorClientWithTimeout(timeout time.Duration) (operatorservice.OperatorServiceClient, error)

NewLocalOperatorClientWithTimeout mocks base method.

func (*MockFactory) NewMatchingClientWithTimeout

func (m *MockFactory) NewMatchingClientWithTimeout(namespaceIDToName NamespaceIDToNameFunc, timeout, longPollTimeout time.Duration) (matchingservice.MatchingServiceClient, error)

NewMatchingClientWithTimeout mocks base method.

func (*MockFactory) NewRemoteAdminClientWithTimeout

func (m *MockFactory) NewRemoteAdminClientWithTimeout(rpcAddress string, timeout, largeTimeout time.Duration) adminservice.AdminServiceClient

NewRemoteAdminClientWithTimeout mocks base method.

func (*MockFactory) NewRemoteFrontendClientWithTimeout

func (m *MockFactory) NewRemoteFrontendClientWithTimeout(rpcAddress string, timeout, longPollTimeout time.Duration) (grpc.ClientConnInterface, workflowservice.WorkflowServiceClient)

NewRemoteFrontendClientWithTimeout mocks base method.

func (*MockFactory) NewRemoteOperatorClientWithTimeout

func (m *MockFactory) NewRemoteOperatorClientWithTimeout(rpcAddress string, timeout time.Duration) operatorservice.OperatorServiceClient

NewRemoteOperatorClientWithTimeout mocks base method.

type MockFactoryMockRecorder

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

MockFactoryMockRecorder is the mock recorder for MockFactory.

func (*MockFactoryMockRecorder) NewHistoryClientWithTimeout

func (mr *MockFactoryMockRecorder) NewHistoryClientWithTimeout(timeout any) *gomock.Call

NewHistoryClientWithTimeout indicates an expected call of NewHistoryClientWithTimeout.

func (*MockFactoryMockRecorder) NewLocalAdminClientWithTimeout

func (mr *MockFactoryMockRecorder) NewLocalAdminClientWithTimeout(timeout, largeTimeout any) *gomock.Call

NewLocalAdminClientWithTimeout indicates an expected call of NewLocalAdminClientWithTimeout.

func (*MockFactoryMockRecorder) NewLocalFrontendClientWithTimeout

func (mr *MockFactoryMockRecorder) NewLocalFrontendClientWithTimeout(timeout, longPollTimeout any) *gomock.Call

NewLocalFrontendClientWithTimeout indicates an expected call of NewLocalFrontendClientWithTimeout.

func (*MockFactoryMockRecorder) NewLocalOperatorClientWithTimeout

func (mr *MockFactoryMockRecorder) NewLocalOperatorClientWithTimeout(timeout any) *gomock.Call

NewLocalOperatorClientWithTimeout indicates an expected call of NewLocalOperatorClientWithTimeout.

func (*MockFactoryMockRecorder) NewMatchingClientWithTimeout

func (mr *MockFactoryMockRecorder) NewMatchingClientWithTimeout(namespaceIDToName, timeout, longPollTimeout any) *gomock.Call

NewMatchingClientWithTimeout indicates an expected call of NewMatchingClientWithTimeout.

func (*MockFactoryMockRecorder) NewRemoteAdminClientWithTimeout

func (mr *MockFactoryMockRecorder) NewRemoteAdminClientWithTimeout(rpcAddress, timeout, largeTimeout any) *gomock.Call

NewRemoteAdminClientWithTimeout indicates an expected call of NewRemoteAdminClientWithTimeout.

func (*MockFactoryMockRecorder) NewRemoteFrontendClientWithTimeout

func (mr *MockFactoryMockRecorder) NewRemoteFrontendClientWithTimeout(rpcAddress, timeout, longPollTimeout any) *gomock.Call

NewRemoteFrontendClientWithTimeout indicates an expected call of NewRemoteFrontendClientWithTimeout.

func (*MockFactoryMockRecorder) NewRemoteOperatorClientWithTimeout

func (mr *MockFactoryMockRecorder) NewRemoteOperatorClientWithTimeout(rpcAddress, timeout any) *gomock.Call

NewRemoteOperatorClientWithTimeout indicates an expected call of NewRemoteOperatorClientWithTimeout.

type MockFactoryProvider

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

MockFactoryProvider is a mock of FactoryProvider interface.

func NewMockFactoryProvider

func NewMockFactoryProvider(ctrl *gomock.Controller) *MockFactoryProvider

NewMockFactoryProvider creates a new mock instance.

func (*MockFactoryProvider) EXPECT

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

func (*MockFactoryProvider) NewFactory

func (m *MockFactoryProvider) NewFactory(rpcFactory common.RPCFactory, monitor membership.Monitor, metricsHandler metrics.Handler, dc *dynamicconfig.Collection, testHooks testhooks.TestHooks, numberOfHistoryShards int32, logger, throttledLogger log.Logger) Factory

NewFactory mocks base method.

type MockFactoryProviderMockRecorder

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

MockFactoryProviderMockRecorder is the mock recorder for MockFactoryProvider.

func (*MockFactoryProviderMockRecorder) NewFactory

func (mr *MockFactoryProviderMockRecorder) NewFactory(rpcFactory, monitor, metricsHandler, dc, testHooks, numberOfHistoryShards, logger, throttledLogger any) *gomock.Call

NewFactory indicates an expected call of NewFactory.

type NamespaceIDToNameFunc

type NamespaceIDToNameFunc func(id namespace.ID) (namespace.Name, error)

NamespaceIDToNameFunc maps a namespaceID to namespace name. Returns error when mapping is not possible.

Directories

Path Synopsis
historytest
Package historytest contains library test functions for history.NewClient that use ahistory task queue manager.
Package historytest contains library test functions for history.NewClient that use ahistory task queue manager.

Jump to

Keyboard shortcuts

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