Back to godoc.org

Package client

v0.14.1
Latest Go to latest

The latest major version is .

Published: Sep 22, 2020 | License: MIT | Module: github.com/uber/cadence

Overview

Package client is a generated GoMock package.

Index

type Bean

type Bean interface {
	GetHistoryClient() history.Client
	SetHistoryClient(client history.Client)
	GetMatchingClient(domainIDToName DomainIDToNameFunc) (matching.Client, error)
	SetMatchingClient(client matching.Client)
	GetFrontendClient() frontend.Client
	SetFrontendClient(client frontend.Client)
	GetRemoteAdminClient(cluster string) admin.Client
	SetRemoteAdminClient(cluster string, client admin.Client)
	GetRemoteFrontendClient(cluster string) frontend.Client
	SetRemoteFrontendClient(cluster string, client frontend.Client)
}

Bean in an collection of clients

func NewClientBean

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

NewClientBean provides a collection of clients

type DispatcherProvider

type DispatcherProvider interface {
	Get(name string, address string) (*yarpc.Dispatcher, error)
}

DispatcherProvider provides a diapatcher to a given address

func NewDNSYarpcDispatcherProvider

func NewDNSYarpcDispatcherProvider(logger log.Logger, interval time.Duration) DispatcherProvider

NewDNSYarpcDispatcherProvider create a dispatcher provider which handles with IP address

type DomainIDToNameFunc

type DomainIDToNameFunc func(string) (string, error)

DomainIDToNameFunc maps a domainID to domain name. Returns error when mapping is not possible.

type Factory

type Factory interface {
	NewHistoryClient() (history.Client, error)
	NewMatchingClient(domainIDToName DomainIDToNameFunc) (matching.Client, error)
	NewFrontendClient() (frontend.Client, error)

	NewHistoryClientWithTimeout(timeout time.Duration) (history.Client, error)
	NewMatchingClientWithTimeout(domainIDToName DomainIDToNameFunc, timeout time.Duration, longPollTimeout time.Duration) (matching.Client, error)
	NewFrontendClientWithTimeout(timeout time.Duration, longPollTimeout time.Duration) (frontend.Client, error)

	NewAdminClientWithTimeoutAndDispatcher(rpcName string, timeout time.Duration, largeTimeout time.Duration, dispatcher *yarpc.Dispatcher) (admin.Client, error)
	NewFrontendClientWithTimeoutAndDispatcher(rpcName string, timeout time.Duration, longPollTimeout time.Duration, dispatcher *yarpc.Dispatcher) (frontend.Client, error)
}

Factory can be used to create RPC clients for cadence services

func NewRPCClientFactory

func NewRPCClientFactory(
	rpcFactory common.RPCFactory,
	monitor membership.Monitor,
	metricsClient metrics.Client,
	dc *dynamicconfig.Collection,
	numberOfHistoryShards int,
	logger log.Logger,
) Factory

NewRPCClientFactory creates an instance of client factory that knows how to dispatch RPC calls.

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) 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() frontend.Client

GetFrontendClient mocks base method

func (*MockBean) GetHistoryClient

func (m *MockBean) GetHistoryClient() history.Client

GetHistoryClient mocks base method

func (*MockBean) GetMatchingClient

func (m *MockBean) GetMatchingClient(domainIDToName DomainIDToNameFunc) (matching.Client, error)

GetMatchingClient mocks base method

func (*MockBean) GetRemoteAdminClient

func (m *MockBean) GetRemoteAdminClient(cluster string) admin.Client

GetRemoteAdminClient mocks base method

func (*MockBean) GetRemoteFrontendClient

func (m *MockBean) GetRemoteFrontendClient(cluster string) frontend.Client

GetRemoteFrontendClient mocks base method

func (*MockBean) SetFrontendClient

func (m *MockBean) SetFrontendClient(client frontend.Client)

SetFrontendClient mocks base method

func (*MockBean) SetHistoryClient

func (m *MockBean) SetHistoryClient(client history.Client)

SetHistoryClient mocks base method

func (*MockBean) SetMatchingClient

func (m *MockBean) SetMatchingClient(client matching.Client)

SetMatchingClient mocks base method

func (*MockBean) SetRemoteAdminClient

func (m *MockBean) SetRemoteAdminClient(cluster string, client admin.Client)

SetRemoteAdminClient mocks base method

func (*MockBean) SetRemoteFrontendClient

func (m *MockBean) SetRemoteFrontendClient(cluster string, client frontend.Client)

SetRemoteFrontendClient mocks base method

type MockBeanMockRecorder

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

MockBeanMockRecorder is the mock recorder for MockBean

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(domainIDToName interface{}) *gomock.Call

GetMatchingClient indicates an expected call of GetMatchingClient

func (*MockBeanMockRecorder) GetRemoteAdminClient

func (mr *MockBeanMockRecorder) GetRemoteAdminClient(cluster interface{}) *gomock.Call

GetRemoteAdminClient indicates an expected call of GetRemoteAdminClient

func (*MockBeanMockRecorder) GetRemoteFrontendClient

func (mr *MockBeanMockRecorder) GetRemoteFrontendClient(cluster interface{}) *gomock.Call

GetRemoteFrontendClient indicates an expected call of GetRemoteFrontendClient

func (*MockBeanMockRecorder) SetFrontendClient

func (mr *MockBeanMockRecorder) SetFrontendClient(client interface{}) *gomock.Call

SetFrontendClient indicates an expected call of SetFrontendClient

func (*MockBeanMockRecorder) SetHistoryClient

func (mr *MockBeanMockRecorder) SetHistoryClient(client interface{}) *gomock.Call

SetHistoryClient indicates an expected call of SetHistoryClient

func (*MockBeanMockRecorder) SetMatchingClient

func (mr *MockBeanMockRecorder) SetMatchingClient(client interface{}) *gomock.Call

SetMatchingClient indicates an expected call of SetMatchingClient

func (*MockBeanMockRecorder) SetRemoteAdminClient

func (mr *MockBeanMockRecorder) SetRemoteAdminClient(cluster, client interface{}) *gomock.Call

SetRemoteAdminClient indicates an expected call of SetRemoteAdminClient

func (*MockBeanMockRecorder) SetRemoteFrontendClient

func (mr *MockBeanMockRecorder) SetRemoteFrontendClient(cluster, client interface{}) *gomock.Call

SetRemoteFrontendClient indicates an expected call of SetRemoteFrontendClient

type MockDispatcherProvider

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

MockDispatcherProvider is a mock of DispatcherProvider interface

func NewMockDispatcherProvider

func NewMockDispatcherProvider(ctrl *gomock.Controller) *MockDispatcherProvider

NewMockDispatcherProvider creates a new mock instance

func (*MockDispatcherProvider) EXPECT

func (m *MockDispatcherProvider) EXPECT() *MockDispatcherProviderMockRecorder

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

func (*MockDispatcherProvider) Get

func (m *MockDispatcherProvider) Get(name, address string) (*yarpc.Dispatcher, error)

Get mocks base method

type MockDispatcherProviderMockRecorder

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

MockDispatcherProviderMockRecorder is the mock recorder for MockDispatcherProvider

func (*MockDispatcherProviderMockRecorder) Get

func (mr *MockDispatcherProviderMockRecorder) Get(name, address interface{}) *gomock.Call

Get indicates an expected call of Get

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