handler

package
v1.2.19-prerelease05 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: MIT Imports: 33 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package handler is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	common.Daemon

	AddDecisionTask(hCtx *handlerContext, request *types.AddDecisionTaskRequest) (*types.AddDecisionTaskResponse, error)
	AddActivityTask(hCtx *handlerContext, request *types.AddActivityTaskRequest) (*types.AddActivityTaskResponse, error)
	PollForDecisionTask(hCtx *handlerContext, request *types.MatchingPollForDecisionTaskRequest) (*types.MatchingPollForDecisionTaskResponse, error)
	PollForActivityTask(hCtx *handlerContext, request *types.MatchingPollForActivityTaskRequest) (*types.MatchingPollForActivityTaskResponse, error)
	QueryWorkflow(hCtx *handlerContext, request *types.MatchingQueryWorkflowRequest) (*types.QueryWorkflowResponse, error)
	RespondQueryTaskCompleted(hCtx *handlerContext, request *types.MatchingRespondQueryTaskCompletedRequest) error
	CancelOutstandingPoll(hCtx *handlerContext, request *types.CancelOutstandingPollRequest) error
	DescribeTaskList(hCtx *handlerContext, request *types.MatchingDescribeTaskListRequest) (*types.DescribeTaskListResponse, error)
	ListTaskListPartitions(hCtx *handlerContext, request *types.MatchingListTaskListPartitionsRequest) (*types.ListTaskListPartitionsResponse, error)
	GetTaskListsByDomain(hCtx *handlerContext, request *types.GetTaskListsByDomainRequest) (*types.GetTaskListsByDomainResponse, error)
	UpdateTaskListPartitionConfig(hCtx *handlerContext, request *types.MatchingUpdateTaskListPartitionConfigRequest) (*types.MatchingUpdateTaskListPartitionConfigResponse, error)
	RefreshTaskListPartitionConfig(hCtx *handlerContext, request *types.MatchingRefreshTaskListPartitionConfigRequest) (*types.MatchingRefreshTaskListPartitionConfigResponse, error)
}

Engine exposes interfaces for clients to poll for activity and decision tasks.

func NewEngine

func NewEngine(
	taskManager persistence.TaskManager,
	clusterMetadata cluster.Metadata,
	historyService history.Client,
	matchingClient matching.Client,
	config *config.Config,
	logger log.Logger,
	metricsClient metrics.Client,
	domainCache cache.DomainCache,
	resolver membership.Resolver,
	isolationState isolationgroup.State,
	timeSource clock.TimeSource,
) Engine

NewEngine creates an instance of matching engine

type Handler

type Handler interface {
	common.Daemon

	Health(context.Context) (*types.HealthStatus, error)
	AddActivityTask(context.Context, *types.AddActivityTaskRequest) (*types.AddActivityTaskResponse, error)
	AddDecisionTask(context.Context, *types.AddDecisionTaskRequest) (*types.AddDecisionTaskResponse, error)
	CancelOutstandingPoll(context.Context, *types.CancelOutstandingPollRequest) error
	DescribeTaskList(context.Context, *types.MatchingDescribeTaskListRequest) (*types.DescribeTaskListResponse, error)
	ListTaskListPartitions(context.Context, *types.MatchingListTaskListPartitionsRequest) (*types.ListTaskListPartitionsResponse, error)
	GetTaskListsByDomain(context.Context, *types.GetTaskListsByDomainRequest) (*types.GetTaskListsByDomainResponse, error)
	PollForActivityTask(context.Context, *types.MatchingPollForActivityTaskRequest) (*types.MatchingPollForActivityTaskResponse, error)
	PollForDecisionTask(context.Context, *types.MatchingPollForDecisionTaskRequest) (*types.MatchingPollForDecisionTaskResponse, error)
	QueryWorkflow(context.Context, *types.MatchingQueryWorkflowRequest) (*types.QueryWorkflowResponse, error)
	RespondQueryTaskCompleted(context.Context, *types.MatchingRespondQueryTaskCompletedRequest) error
	UpdateTaskListPartitionConfig(context.Context, *types.MatchingUpdateTaskListPartitionConfigRequest) (*types.MatchingUpdateTaskListPartitionConfigResponse, error)
	RefreshTaskListPartitionConfig(context.Context, *types.MatchingRefreshTaskListPartitionConfigRequest) (*types.MatchingRefreshTaskListPartitionConfigResponse, error)
}

Handler interface for matching service

func NewHandler

func NewHandler(
	engine Engine,
	config *config.Config,
	domainCache cache.DomainCache,
	metricsClient metrics.Client,
	logger log.Logger,
	throttledLogger log.Logger,
) Handler

NewHandler creates a thrift handler for the matching service

type MockEngine

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

MockEngine is a mock of Engine interface.

func NewMockEngine

func NewMockEngine(ctrl *gomock.Controller) *MockEngine

NewMockEngine creates a new mock instance.

func (*MockEngine) AddActivityTask

func (m *MockEngine) AddActivityTask(hCtx *handlerContext, request *types.AddActivityTaskRequest) (*types.AddActivityTaskResponse, error)

AddActivityTask mocks base method.

func (*MockEngine) AddDecisionTask

func (m *MockEngine) AddDecisionTask(hCtx *handlerContext, request *types.AddDecisionTaskRequest) (*types.AddDecisionTaskResponse, error)

AddDecisionTask mocks base method.

func (*MockEngine) CancelOutstandingPoll

func (m *MockEngine) CancelOutstandingPoll(hCtx *handlerContext, request *types.CancelOutstandingPollRequest) error

CancelOutstandingPoll mocks base method.

func (*MockEngine) DescribeTaskList

func (m *MockEngine) DescribeTaskList(hCtx *handlerContext, request *types.MatchingDescribeTaskListRequest) (*types.DescribeTaskListResponse, error)

DescribeTaskList mocks base method.

func (*MockEngine) EXPECT

func (m *MockEngine) EXPECT() *MockEngineMockRecorder

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

func (*MockEngine) GetTaskListsByDomain

func (m *MockEngine) GetTaskListsByDomain(hCtx *handlerContext, request *types.GetTaskListsByDomainRequest) (*types.GetTaskListsByDomainResponse, error)

GetTaskListsByDomain mocks base method.

func (*MockEngine) ListTaskListPartitions

func (m *MockEngine) ListTaskListPartitions(hCtx *handlerContext, request *types.MatchingListTaskListPartitionsRequest) (*types.ListTaskListPartitionsResponse, error)

ListTaskListPartitions mocks base method.

func (*MockEngine) PollForActivityTask

func (m *MockEngine) PollForActivityTask(hCtx *handlerContext, request *types.MatchingPollForActivityTaskRequest) (*types.MatchingPollForActivityTaskResponse, error)

PollForActivityTask mocks base method.

func (*MockEngine) PollForDecisionTask

func (m *MockEngine) PollForDecisionTask(hCtx *handlerContext, request *types.MatchingPollForDecisionTaskRequest) (*types.MatchingPollForDecisionTaskResponse, error)

PollForDecisionTask mocks base method.

func (*MockEngine) QueryWorkflow

func (m *MockEngine) QueryWorkflow(hCtx *handlerContext, request *types.MatchingQueryWorkflowRequest) (*types.QueryWorkflowResponse, error)

QueryWorkflow mocks base method.

func (*MockEngine) RefreshTaskListPartitionConfig added in v1.2.15

func (m *MockEngine) RefreshTaskListPartitionConfig(hCtx *handlerContext, request *types.MatchingRefreshTaskListPartitionConfigRequest) (*types.MatchingRefreshTaskListPartitionConfigResponse, error)

RefreshTaskListPartitionConfig mocks base method.

func (*MockEngine) RespondQueryTaskCompleted

func (m *MockEngine) RespondQueryTaskCompleted(hCtx *handlerContext, request *types.MatchingRespondQueryTaskCompletedRequest) error

RespondQueryTaskCompleted mocks base method.

func (*MockEngine) Start added in v1.2.13

func (m *MockEngine) Start()

Start mocks base method.

func (*MockEngine) Stop

func (m *MockEngine) Stop()

Stop mocks base method.

func (*MockEngine) UpdateTaskListPartitionConfig added in v1.2.15

func (m *MockEngine) UpdateTaskListPartitionConfig(hCtx *handlerContext, request *types.MatchingUpdateTaskListPartitionConfigRequest) (*types.MatchingUpdateTaskListPartitionConfigResponse, error)

UpdateTaskListPartitionConfig mocks base method.

type MockEngineMockRecorder

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

MockEngineMockRecorder is the mock recorder for MockEngine.

func (*MockEngineMockRecorder) AddActivityTask

func (mr *MockEngineMockRecorder) AddActivityTask(hCtx, request any) *gomock.Call

AddActivityTask indicates an expected call of AddActivityTask.

func (*MockEngineMockRecorder) AddDecisionTask

func (mr *MockEngineMockRecorder) AddDecisionTask(hCtx, request any) *gomock.Call

AddDecisionTask indicates an expected call of AddDecisionTask.

func (*MockEngineMockRecorder) CancelOutstandingPoll

func (mr *MockEngineMockRecorder) CancelOutstandingPoll(hCtx, request any) *gomock.Call

CancelOutstandingPoll indicates an expected call of CancelOutstandingPoll.

func (*MockEngineMockRecorder) DescribeTaskList

func (mr *MockEngineMockRecorder) DescribeTaskList(hCtx, request any) *gomock.Call

DescribeTaskList indicates an expected call of DescribeTaskList.

func (*MockEngineMockRecorder) GetTaskListsByDomain

func (mr *MockEngineMockRecorder) GetTaskListsByDomain(hCtx, request any) *gomock.Call

GetTaskListsByDomain indicates an expected call of GetTaskListsByDomain.

func (*MockEngineMockRecorder) ListTaskListPartitions

func (mr *MockEngineMockRecorder) ListTaskListPartitions(hCtx, request any) *gomock.Call

ListTaskListPartitions indicates an expected call of ListTaskListPartitions.

func (*MockEngineMockRecorder) PollForActivityTask

func (mr *MockEngineMockRecorder) PollForActivityTask(hCtx, request any) *gomock.Call

PollForActivityTask indicates an expected call of PollForActivityTask.

func (*MockEngineMockRecorder) PollForDecisionTask

func (mr *MockEngineMockRecorder) PollForDecisionTask(hCtx, request any) *gomock.Call

PollForDecisionTask indicates an expected call of PollForDecisionTask.

func (*MockEngineMockRecorder) QueryWorkflow

func (mr *MockEngineMockRecorder) QueryWorkflow(hCtx, request any) *gomock.Call

QueryWorkflow indicates an expected call of QueryWorkflow.

func (*MockEngineMockRecorder) RefreshTaskListPartitionConfig added in v1.2.15

func (mr *MockEngineMockRecorder) RefreshTaskListPartitionConfig(hCtx, request any) *gomock.Call

RefreshTaskListPartitionConfig indicates an expected call of RefreshTaskListPartitionConfig.

func (*MockEngineMockRecorder) RespondQueryTaskCompleted

func (mr *MockEngineMockRecorder) RespondQueryTaskCompleted(hCtx, request any) *gomock.Call

RespondQueryTaskCompleted indicates an expected call of RespondQueryTaskCompleted.

func (*MockEngineMockRecorder) Start added in v1.2.13

func (mr *MockEngineMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockEngineMockRecorder) Stop

func (mr *MockEngineMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop.

func (*MockEngineMockRecorder) UpdateTaskListPartitionConfig added in v1.2.15

func (mr *MockEngineMockRecorder) UpdateTaskListPartitionConfig(hCtx, request any) *gomock.Call

UpdateTaskListPartitionConfig indicates an expected call of UpdateTaskListPartitionConfig.

type MockHandler

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

MockHandler is a mock of Handler interface.

func NewMockHandler

func NewMockHandler(ctrl *gomock.Controller) *MockHandler

NewMockHandler creates a new mock instance.

func (*MockHandler) AddActivityTask

AddActivityTask mocks base method.

func (*MockHandler) AddDecisionTask

AddDecisionTask mocks base method.

func (*MockHandler) CancelOutstandingPoll

func (m *MockHandler) CancelOutstandingPoll(arg0 context.Context, arg1 *types.CancelOutstandingPollRequest) error

CancelOutstandingPoll mocks base method.

func (*MockHandler) DescribeTaskList

DescribeTaskList mocks base method.

func (*MockHandler) EXPECT

func (m *MockHandler) EXPECT() *MockHandlerMockRecorder

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

func (*MockHandler) GetTaskListsByDomain

GetTaskListsByDomain mocks base method.

func (*MockHandler) Health

func (m *MockHandler) Health(arg0 context.Context) (*types.HealthStatus, error)

Health mocks base method.

func (*MockHandler) ListTaskListPartitions

ListTaskListPartitions mocks base method.

func (*MockHandler) PollForActivityTask

PollForActivityTask mocks base method.

func (*MockHandler) PollForDecisionTask

PollForDecisionTask mocks base method.

func (*MockHandler) QueryWorkflow

QueryWorkflow mocks base method.

func (*MockHandler) RefreshTaskListPartitionConfig added in v1.2.15

RefreshTaskListPartitionConfig mocks base method.

func (*MockHandler) RespondQueryTaskCompleted

func (m *MockHandler) RespondQueryTaskCompleted(arg0 context.Context, arg1 *types.MatchingRespondQueryTaskCompletedRequest) error

RespondQueryTaskCompleted mocks base method.

func (*MockHandler) Start

func (m *MockHandler) Start()

Start mocks base method.

func (*MockHandler) Stop

func (m *MockHandler) Stop()

Stop mocks base method.

func (*MockHandler) UpdateTaskListPartitionConfig added in v1.2.15

UpdateTaskListPartitionConfig mocks base method.

type MockHandlerMockRecorder

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

MockHandlerMockRecorder is the mock recorder for MockHandler.

func (*MockHandlerMockRecorder) AddActivityTask

func (mr *MockHandlerMockRecorder) AddActivityTask(arg0, arg1 any) *gomock.Call

AddActivityTask indicates an expected call of AddActivityTask.

func (*MockHandlerMockRecorder) AddDecisionTask

func (mr *MockHandlerMockRecorder) AddDecisionTask(arg0, arg1 any) *gomock.Call

AddDecisionTask indicates an expected call of AddDecisionTask.

func (*MockHandlerMockRecorder) CancelOutstandingPoll

func (mr *MockHandlerMockRecorder) CancelOutstandingPoll(arg0, arg1 any) *gomock.Call

CancelOutstandingPoll indicates an expected call of CancelOutstandingPoll.

func (*MockHandlerMockRecorder) DescribeTaskList

func (mr *MockHandlerMockRecorder) DescribeTaskList(arg0, arg1 any) *gomock.Call

DescribeTaskList indicates an expected call of DescribeTaskList.

func (*MockHandlerMockRecorder) GetTaskListsByDomain

func (mr *MockHandlerMockRecorder) GetTaskListsByDomain(arg0, arg1 any) *gomock.Call

GetTaskListsByDomain indicates an expected call of GetTaskListsByDomain.

func (*MockHandlerMockRecorder) Health

func (mr *MockHandlerMockRecorder) Health(arg0 any) *gomock.Call

Health indicates an expected call of Health.

func (*MockHandlerMockRecorder) ListTaskListPartitions

func (mr *MockHandlerMockRecorder) ListTaskListPartitions(arg0, arg1 any) *gomock.Call

ListTaskListPartitions indicates an expected call of ListTaskListPartitions.

func (*MockHandlerMockRecorder) PollForActivityTask

func (mr *MockHandlerMockRecorder) PollForActivityTask(arg0, arg1 any) *gomock.Call

PollForActivityTask indicates an expected call of PollForActivityTask.

func (*MockHandlerMockRecorder) PollForDecisionTask

func (mr *MockHandlerMockRecorder) PollForDecisionTask(arg0, arg1 any) *gomock.Call

PollForDecisionTask indicates an expected call of PollForDecisionTask.

func (*MockHandlerMockRecorder) QueryWorkflow

func (mr *MockHandlerMockRecorder) QueryWorkflow(arg0, arg1 any) *gomock.Call

QueryWorkflow indicates an expected call of QueryWorkflow.

func (*MockHandlerMockRecorder) RefreshTaskListPartitionConfig added in v1.2.15

func (mr *MockHandlerMockRecorder) RefreshTaskListPartitionConfig(arg0, arg1 any) *gomock.Call

RefreshTaskListPartitionConfig indicates an expected call of RefreshTaskListPartitionConfig.

func (*MockHandlerMockRecorder) RespondQueryTaskCompleted

func (mr *MockHandlerMockRecorder) RespondQueryTaskCompleted(arg0, arg1 any) *gomock.Call

RespondQueryTaskCompleted indicates an expected call of RespondQueryTaskCompleted.

func (*MockHandlerMockRecorder) Start

func (mr *MockHandlerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockHandlerMockRecorder) Stop

func (mr *MockHandlerMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop.

func (*MockHandlerMockRecorder) UpdateTaskListPartitionConfig added in v1.2.15

func (mr *MockHandlerMockRecorder) UpdateTaskListPartitionConfig(arg0, arg1 any) *gomock.Call

UpdateTaskListPartitionConfig indicates an expected call of UpdateTaskListPartitionConfig.

Jump to

Keyboard shortcuts

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