Documentation ¶
Overview ¶
Package matching is a generated GoMock package.
Index ¶
- Constants
- type Client
- func NewClient(timeout time.Duration, longPollTimeout time.Duration, ...) Client
- func NewErrorInjectionClient(client Client, errorRate float64, logger log.Logger) Client
- func NewMetricClient(client Client, metricsClient metrics.Client) Client
- func NewRetryableClient(client Client, policy backoff.RetryPolicy, isRetryable backoff.IsRetryable) Client
- func NewThriftClient(c matchingserviceclient.Interface) Client
- type LoadBalancer
- type MockClient
- func (m *MockClient) AddActivityTask(arg0 context.Context, arg1 *types.AddActivityTaskRequest, ...) error
- func (m *MockClient) AddDecisionTask(arg0 context.Context, arg1 *types.AddDecisionTaskRequest, ...) error
- func (m *MockClient) CancelOutstandingPoll(arg0 context.Context, arg1 *types.CancelOutstandingPollRequest, ...) error
- func (m *MockClient) DescribeTaskList(arg0 context.Context, arg1 *types.MatchingDescribeTaskListRequest, ...) (*types.DescribeTaskListResponse, error)
- func (m *MockClient) EXPECT() *MockClientMockRecorder
- func (m *MockClient) ListTaskListPartitions(arg0 context.Context, arg1 *types.MatchingListTaskListPartitionsRequest, ...) (*types.ListTaskListPartitionsResponse, error)
- func (m *MockClient) PollForActivityTask(arg0 context.Context, arg1 *types.MatchingPollForActivityTaskRequest, ...) (*types.PollForActivityTaskResponse, error)
- func (m *MockClient) PollForDecisionTask(arg0 context.Context, arg1 *types.MatchingPollForDecisionTaskRequest, ...) (*types.MatchingPollForDecisionTaskResponse, error)
- func (m *MockClient) QueryWorkflow(arg0 context.Context, arg1 *types.MatchingQueryWorkflowRequest, ...) (*types.QueryWorkflowResponse, error)
- func (m *MockClient) RespondQueryTaskCompleted(arg0 context.Context, arg1 *types.MatchingRespondQueryTaskCompletedRequest, ...) error
- type MockClientMockRecorder
- func (mr *MockClientMockRecorder) AddActivityTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) AddDecisionTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) CancelOutstandingPoll(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) DescribeTaskList(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) ListTaskListPartitions(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) PollForActivityTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) PollForDecisionTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) QueryWorkflow(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
- func (mr *MockClientMockRecorder) RespondQueryTaskCompleted(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
Constants ¶
const ( // DefaultTimeout is the default timeout used to make calls DefaultTimeout = time.Minute // DefaultLongPollTimeout is the long poll default timeout used to make calls DefaultLongPollTimeout = time.Minute * 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { AddActivityTask(context.Context, *types.AddActivityTaskRequest, ...yarpc.CallOption) error AddDecisionTask(context.Context, *types.AddDecisionTaskRequest, ...yarpc.CallOption) error CancelOutstandingPoll(context.Context, *types.CancelOutstandingPollRequest, ...yarpc.CallOption) error DescribeTaskList(context.Context, *types.MatchingDescribeTaskListRequest, ...yarpc.CallOption) (*types.DescribeTaskListResponse, error) ListTaskListPartitions(context.Context, *types.MatchingListTaskListPartitionsRequest, ...yarpc.CallOption) (*types.ListTaskListPartitionsResponse, error) PollForActivityTask(context.Context, *types.MatchingPollForActivityTaskRequest, ...yarpc.CallOption) (*types.PollForActivityTaskResponse, error) PollForDecisionTask(context.Context, *types.MatchingPollForDecisionTaskRequest, ...yarpc.CallOption) (*types.MatchingPollForDecisionTaskResponse, error) QueryWorkflow(context.Context, *types.MatchingQueryWorkflowRequest, ...yarpc.CallOption) (*types.QueryWorkflowResponse, error) RespondQueryTaskCompleted(context.Context, *types.MatchingRespondQueryTaskCompletedRequest, ...yarpc.CallOption) error }
Client is the interface exposed by types service client
func NewClient ¶
func NewClient( timeout time.Duration, longPollTimeout time.Duration, clients common.ClientCache, lb LoadBalancer, ) Client
NewClient creates a new history service TChannel client
func NewErrorInjectionClient ¶ added in v0.18.0
NewErrorInjectionClient creates a new instance of Client that injects fake error
func NewMetricClient ¶
NewMetricClient creates a new instance of Client that emits metrics
func NewRetryableClient ¶ added in v0.3.14
func NewRetryableClient( client Client, policy backoff.RetryPolicy, isRetryable backoff.IsRetryable, ) Client
NewRetryableClient creates a new instance of Client with retry policy
func NewThriftClient ¶ added in v0.17.0
func NewThriftClient(c matchingserviceclient.Interface) Client
NewThriftClient creates a new instance of Client with thrift protocol
type LoadBalancer ¶ added in v0.7.0
type LoadBalancer interface { // PickWritePartition returns the task list partition for adding // an activity or decision task. The input is the name of the // original task list (with no partition info). When forwardedFrom // is non-empty, this call is forwardedFrom from a child partition // to a parent partition in which case, no load balancing should be // performed PickWritePartition( domainID string, taskList types.TaskList, taskListType int, forwardedFrom string, ) string // PickReadPartition returns the task list partition to send a poller to. // Input is name of the original task list as specified by caller. When // forwardedFrom is non-empty, no load balancing should be done. PickReadPartition( domainID string, taskList types.TaskList, taskListType int, forwardedFrom string, ) string }
LoadBalancer is the interface for implementers of component that distributes add/poll api calls across available task list partitions when possible
func NewLoadBalancer ¶ added in v0.7.0
func NewLoadBalancer( domainIDToName func(string) (string, error), dc *dynamicconfig.Collection, ) LoadBalancer
NewLoadBalancer returns an instance of matching load balancer that can help distribute api calls across task list partitions
type MockClient ¶ added in v0.17.0
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface
func NewMockClient ¶ added in v0.17.0
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance
func (*MockClient) AddActivityTask ¶ added in v0.17.0
func (m *MockClient) AddActivityTask(arg0 context.Context, arg1 *types.AddActivityTaskRequest, arg2 ...yarpc.CallOption) error
AddActivityTask mocks base method
func (*MockClient) AddDecisionTask ¶ added in v0.17.0
func (m *MockClient) AddDecisionTask(arg0 context.Context, arg1 *types.AddDecisionTaskRequest, arg2 ...yarpc.CallOption) error
AddDecisionTask mocks base method
func (*MockClient) CancelOutstandingPoll ¶ added in v0.17.0
func (m *MockClient) CancelOutstandingPoll(arg0 context.Context, arg1 *types.CancelOutstandingPollRequest, arg2 ...yarpc.CallOption) error
CancelOutstandingPoll mocks base method
func (*MockClient) DescribeTaskList ¶ added in v0.17.0
func (m *MockClient) DescribeTaskList(arg0 context.Context, arg1 *types.MatchingDescribeTaskListRequest, arg2 ...yarpc.CallOption) (*types.DescribeTaskListResponse, error)
DescribeTaskList mocks base method
func (*MockClient) EXPECT ¶ added in v0.17.0
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClient) ListTaskListPartitions ¶ added in v0.17.0
func (m *MockClient) ListTaskListPartitions(arg0 context.Context, arg1 *types.MatchingListTaskListPartitionsRequest, arg2 ...yarpc.CallOption) (*types.ListTaskListPartitionsResponse, error)
ListTaskListPartitions mocks base method
func (*MockClient) PollForActivityTask ¶ added in v0.17.0
func (m *MockClient) PollForActivityTask(arg0 context.Context, arg1 *types.MatchingPollForActivityTaskRequest, arg2 ...yarpc.CallOption) (*types.PollForActivityTaskResponse, error)
PollForActivityTask mocks base method
func (*MockClient) PollForDecisionTask ¶ added in v0.17.0
func (m *MockClient) PollForDecisionTask(arg0 context.Context, arg1 *types.MatchingPollForDecisionTaskRequest, arg2 ...yarpc.CallOption) (*types.MatchingPollForDecisionTaskResponse, error)
PollForDecisionTask mocks base method
func (*MockClient) QueryWorkflow ¶ added in v0.17.0
func (m *MockClient) QueryWorkflow(arg0 context.Context, arg1 *types.MatchingQueryWorkflowRequest, arg2 ...yarpc.CallOption) (*types.QueryWorkflowResponse, error)
QueryWorkflow mocks base method
func (*MockClient) RespondQueryTaskCompleted ¶ added in v0.17.0
func (m *MockClient) RespondQueryTaskCompleted(arg0 context.Context, arg1 *types.MatchingRespondQueryTaskCompletedRequest, arg2 ...yarpc.CallOption) error
RespondQueryTaskCompleted mocks base method
type MockClientMockRecorder ¶ added in v0.17.0
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient
func (*MockClientMockRecorder) AddActivityTask ¶ added in v0.17.0
func (mr *MockClientMockRecorder) AddActivityTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
AddActivityTask indicates an expected call of AddActivityTask
func (*MockClientMockRecorder) AddDecisionTask ¶ added in v0.17.0
func (mr *MockClientMockRecorder) AddDecisionTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
AddDecisionTask indicates an expected call of AddDecisionTask
func (*MockClientMockRecorder) CancelOutstandingPoll ¶ added in v0.17.0
func (mr *MockClientMockRecorder) CancelOutstandingPoll(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
CancelOutstandingPoll indicates an expected call of CancelOutstandingPoll
func (*MockClientMockRecorder) DescribeTaskList ¶ added in v0.17.0
func (mr *MockClientMockRecorder) DescribeTaskList(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
DescribeTaskList indicates an expected call of DescribeTaskList
func (*MockClientMockRecorder) ListTaskListPartitions ¶ added in v0.17.0
func (mr *MockClientMockRecorder) ListTaskListPartitions(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
ListTaskListPartitions indicates an expected call of ListTaskListPartitions
func (*MockClientMockRecorder) PollForActivityTask ¶ added in v0.17.0
func (mr *MockClientMockRecorder) PollForActivityTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
PollForActivityTask indicates an expected call of PollForActivityTask
func (*MockClientMockRecorder) PollForDecisionTask ¶ added in v0.17.0
func (mr *MockClientMockRecorder) PollForDecisionTask(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
PollForDecisionTask indicates an expected call of PollForDecisionTask
func (*MockClientMockRecorder) QueryWorkflow ¶ added in v0.17.0
func (mr *MockClientMockRecorder) QueryWorkflow(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
QueryWorkflow indicates an expected call of QueryWorkflow
func (*MockClientMockRecorder) RespondQueryTaskCompleted ¶ added in v0.17.0
func (mr *MockClientMockRecorder) RespondQueryTaskCompleted(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call
RespondQueryTaskCompleted indicates an expected call of RespondQueryTaskCompleted