Back to

Package client

Latest Go to latest

The latest major version is .

Published: Aug 27, 2019 | License: MIT | Module:


type Bean

type Bean interface {
	GetHistoryClient() history.Client
	GetMatchingClient(domainIDToName DomainIDToNameFunc) (matching.Client, error)
	GetFrontendClient() frontend.Client
	GetRemoteAdminClient(cluster string) admin.Client
	GetRemoteFrontendClient(cluster string) 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, 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,
) Factory

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

type MockClientBean

type MockClientBean struct {

MockClientBean is an autogenerated mock type for the MockClientBean type

func (*MockClientBean) GetFrontendClient

func (_m *MockClientBean) GetFrontendClient() frontend.Client

GetFrontendClient provides a mock function with given fields:

func (*MockClientBean) GetHistoryClient

func (_m *MockClientBean) GetHistoryClient() history.Client

GetHistoryClient provides a mock function with given fields:

func (*MockClientBean) GetMatchingClient

func (_m *MockClientBean) GetMatchingClient(domainIDToName DomainIDToNameFunc) (matching.Client, error)

GetMatchingClient provides a mock function with given fields: domainIDToName

func (*MockClientBean) GetRemoteAdminClient

func (_m *MockClientBean) GetRemoteAdminClient(_a0 string) admin.Client

GetRemoteAdminClient provides a mock function with given fields: _a0

func (*MockClientBean) GetRemoteFrontendClient

func (_m *MockClientBean) GetRemoteFrontendClient(_a0 string) frontend.Client

GetRemoteFrontendClient provides a mock function with given fields: _a0

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