client

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bean added in v0.5.0

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 added in v0.5.0

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

NewClientBean provides a collection of clients

type DispatcherProvider added in v0.5.0

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

DispatcherProvider provides a diapatcher to a given address

func NewDNSYarpcDispatcherProvider added in v0.6.0

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

NewDNSYarpcDispatcherProvider create a dispatcher provider which handles with IP address

type DomainIDToNameFunc added in v0.7.0

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 added in v0.3.2

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 added in v0.5.0

type MockClientBean struct {
	mock.Mock
}

MockClientBean is an autogenerated mock type for the MockClientBean type

func (*MockClientBean) GetFrontendClient added in v0.5.0

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

GetFrontendClient provides a mock function with given fields:

func (*MockClientBean) GetHistoryClient added in v0.5.0

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

GetHistoryClient provides a mock function with given fields:

func (*MockClientBean) GetMatchingClient added in v0.5.0

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

GetMatchingClient provides a mock function with given fields: domainIDToName

func (*MockClientBean) GetRemoteAdminClient added in v0.5.0

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

GetRemoteAdminClient provides a mock function with given fields: _a0

func (*MockClientBean) GetRemoteFrontendClient added in v0.5.0

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

GetRemoteFrontendClient provides a mock function with given fields: _a0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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