Documentation ¶
Overview ¶
Package tasklist is a generated GoMock package.
Index ¶
- Variables
- func ContextWithIdentity(ctx context.Context, identity string) context.Context
- func ContextWithIsolationGroup(ctx context.Context, isolationGroup string) context.Context
- func ContextWithPollerID(ctx context.Context, pollerID string) context.Context
- func IdentityFromContext(ctx context.Context) string
- func IsolationGroupFromContext(ctx context.Context) string
- func PollerIDFromContext(ctx context.Context) string
- type AdaptiveScaler
- type AddTaskParams
- type DomainIsActiveInThisClusterError
- type Forwarder
- type ForwarderReqToken
- type Identifier
- func (tid *Identifier) GetDomainID() string
- func (tn *Identifier) GetName() string
- func (tn *Identifier) GetPartition(partition int) string
- func (tn *Identifier) GetRoot() string
- func (tid *Identifier) GetType() int
- func (tn *Identifier) IsRoot() bool
- func (tn *Identifier) Parent(degree int) string
- func (tn *Identifier) Partition() int
- func (tid *Identifier) String() string
- type InternalTask
- func (task *InternalTask) Finish(err error)
- func (task *InternalTask) Info() persistence.TaskInfo
- func (task *InternalTask) IsForwarded() bool
- func (task *InternalTask) IsQuery() bool
- func (task *InternalTask) IsStarted() bool
- func (task *InternalTask) IsSyncMatch() bool
- func (task *InternalTask) PollForActivityResponse() *types.MatchingPollForActivityTaskResponse
- func (task *InternalTask) PollForDecisionResponse() *types.MatchingPollForDecisionTaskResponse
- func (task *InternalTask) WorkflowExecution() *types.WorkflowExecution
- type Manager
- type MockForwarder
- func (m *MockForwarder) AddReqTokenC() <-chan *ForwarderReqToken
- func (m *MockForwarder) EXPECT() *MockForwarderMockRecorder
- func (m *MockForwarder) ForwardPoll(ctx context.Context) (*InternalTask, error)
- func (m *MockForwarder) ForwardQueryTask(ctx context.Context, task *InternalTask) (*types.QueryWorkflowResponse, error)
- func (m *MockForwarder) ForwardTask(ctx context.Context, task *InternalTask) error
- func (m *MockForwarder) PollReqTokenC(isolationGroup string) <-chan *ForwarderReqToken
- type MockForwarderMockRecorder
- func (mr *MockForwarderMockRecorder) AddReqTokenC() *gomock.Call
- func (mr *MockForwarderMockRecorder) ForwardPoll(ctx interface{}) *gomock.Call
- func (mr *MockForwarderMockRecorder) ForwardQueryTask(ctx, task interface{}) *gomock.Call
- func (mr *MockForwarderMockRecorder) ForwardTask(ctx, task interface{}) *gomock.Call
- func (mr *MockForwarderMockRecorder) PollReqTokenC(isolationGroup interface{}) *gomock.Call
- type MockManager
- func (m *MockManager) AddTask(ctx context.Context, params AddTaskParams) (bool, error)
- func (m *MockManager) CancelPoller(pollerID string)
- func (m *MockManager) DescribeTaskList(includeTaskListStatus bool) *types.DescribeTaskListResponse
- func (m *MockManager) DispatchQueryTask(ctx context.Context, taskID string, ...) (*types.QueryWorkflowResponse, error)
- func (m *MockManager) DispatchTask(ctx context.Context, task *InternalTask) error
- func (m *MockManager) EXPECT() *MockManagerMockRecorder
- func (m *MockManager) GetAllPollerInfo() []*types.PollerInfo
- func (m *MockManager) GetTask(ctx context.Context, maxDispatchPerSecond *float64) (*InternalTask, error)
- func (m *MockManager) GetTaskListKind() types.TaskListKind
- func (m *MockManager) HasPollerAfter(accessTime time.Time) bool
- func (m *MockManager) LoadBalancerHints() *types.LoadBalancerHints
- func (m *MockManager) RefreshTaskListPartitionConfig(arg0 context.Context, arg1 *types.TaskListPartitionConfig) error
- func (m *MockManager) Start() error
- func (m *MockManager) Stop()
- func (m *MockManager) String() string
- func (m *MockManager) TaskListID() *Identifier
- func (m *MockManager) TaskListPartitionConfig() *types.TaskListPartitionConfig
- func (m *MockManager) UpdateTaskListPartitionConfig(arg0 context.Context, arg1 *types.TaskListPartitionConfig) error
- type MockManagerMockRecorder
- func (mr *MockManagerMockRecorder) AddTask(ctx, params interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) CancelPoller(pollerID interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) DescribeTaskList(includeTaskListStatus interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) DispatchQueryTask(ctx, taskID, request interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) DispatchTask(ctx, task interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetAllPollerInfo() *gomock.Call
- func (mr *MockManagerMockRecorder) GetTask(ctx, maxDispatchPerSecond interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) GetTaskListKind() *gomock.Call
- func (mr *MockManagerMockRecorder) HasPollerAfter(accessTime interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) LoadBalancerHints() *gomock.Call
- func (mr *MockManagerMockRecorder) RefreshTaskListPartitionConfig(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockManagerMockRecorder) Start() *gomock.Call
- func (mr *MockManagerMockRecorder) Stop() *gomock.Call
- func (mr *MockManagerMockRecorder) String() *gomock.Call
- func (mr *MockManagerMockRecorder) TaskListID() *gomock.Call
- func (mr *MockManagerMockRecorder) TaskListPartitionConfig() *gomock.Call
- func (mr *MockManagerMockRecorder) UpdateTaskListPartitionConfig(arg0, arg1 interface{}) *gomock.Call
- type MockTaskCompleter
- type MockTaskCompleterMockRecorder
- type MockTaskMatcher
- func (m *MockTaskMatcher) DisconnectBlockedPollers()
- func (m *MockTaskMatcher) EXPECT() *MockTaskMatcherMockRecorder
- func (m *MockTaskMatcher) MustOffer(ctx context.Context, task *InternalTask) error
- func (m *MockTaskMatcher) Offer(ctx context.Context, task *InternalTask) (bool, error)
- func (m *MockTaskMatcher) OfferOrTimeout(ctx context.Context, startT time.Time, task *InternalTask) (bool, error)
- func (m *MockTaskMatcher) OfferQuery(ctx context.Context, task *InternalTask) (*types.QueryWorkflowResponse, error)
- func (m *MockTaskMatcher) Poll(ctx context.Context, isolationGroup string) (*InternalTask, error)
- func (m *MockTaskMatcher) PollForQuery(ctx context.Context) (*InternalTask, error)
- func (m *MockTaskMatcher) Rate() float64
- func (m *MockTaskMatcher) UpdateRatelimit(rps *float64)
- type MockTaskMatcherMockRecorder
- func (mr *MockTaskMatcherMockRecorder) DisconnectBlockedPollers() *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) MustOffer(ctx, task interface{}) *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) Offer(ctx, task interface{}) *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) OfferOrTimeout(ctx, startT, task interface{}) *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) OfferQuery(ctx, task interface{}) *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) Poll(ctx, isolationGroup interface{}) *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) PollForQuery(ctx interface{}) *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) Rate() *gomock.Call
- func (mr *MockTaskMatcherMockRecorder) UpdateRatelimit(rps interface{}) *gomock.Call
- type TaskCompleter
- type TaskMatcher
- type TestTaskManager
- func (m *TestTaskManager) Close()
- func (m *TestTaskManager) CompleteTask(_ context.Context, request *persistence.CompleteTaskRequest) error
- func (m *TestTaskManager) CompleteTasksLessThan(_ context.Context, request *persistence.CompleteTasksLessThanRequest) (*persistence.CompleteTasksLessThanResponse, error)
- func (m *TestTaskManager) CreateTasks(_ context.Context, request *persistence.CreateTasksRequest) (*persistence.CreateTasksResponse, error)
- func (m *TestTaskManager) DeleteTaskList(_ context.Context, request *persistence.DeleteTaskListRequest) error
- func (m *TestTaskManager) GetCreateTaskCount(taskList *Identifier) int
- func (m *TestTaskManager) GetName() string
- func (m *TestTaskManager) GetOrphanTasks(_ context.Context, request *persistence.GetOrphanTasksRequest) (*persistence.GetOrphanTasksResponse, error)
- func (m *TestTaskManager) GetRangeID(taskList *Identifier) int64
- func (m *TestTaskManager) GetTaskCount(taskList *Identifier) int
- func (m *TestTaskManager) GetTaskList(_ context.Context, request *persistence.GetTaskListRequest) (*persistence.GetTaskListResponse, error)
- func (m *TestTaskManager) GetTaskListSize(_ context.Context, request *persistence.GetTaskListSizeRequest) (*persistence.GetTaskListSizeResponse, error)
- func (m *TestTaskManager) GetTasks(_ context.Context, request *persistence.GetTasksRequest) (*persistence.GetTasksResponse, error)
- func (m *TestTaskManager) LeaseTaskList(_ context.Context, request *persistence.LeaseTaskListRequest) (*persistence.LeaseTaskListResponse, error)
- func (m *TestTaskManager) ListTaskList(_ context.Context, request *persistence.ListTaskListRequest) (*persistence.ListTaskListResponse, error)
- func (m *TestTaskManager) SetRangeID(taskList *Identifier, rangeID int64)
- func (m *TestTaskManager) String() string
- func (m *TestTaskManager) UpdateTaskList(_ context.Context, request *persistence.UpdateTaskListRequest) (*persistence.UpdateTaskListResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrNoParent = errors.New("cannot find parent task list for forwarding") ErrTaskListKind = errors.New("forwarding is not supported on sticky task list") ErrInvalidTaskListType = errors.New("unrecognized task list type") ErrForwarderSlowDown = errors.New("tasklist forwarding throttle limit exceeded") )
var ( // ErrNoTasks is exported temporarily for integration test ErrNoTasks = errors.New("no tasks") )
var ErrTasklistThrottled = errors.New("tasklist limit exceeded")
ErrTasklistThrottled implies a tasklist was throttled
Functions ¶
func ContextWithIdentity ¶
func ContextWithPollerID ¶
func IdentityFromContext ¶
func PollerIDFromContext ¶
Types ¶
type AdaptiveScaler ¶
func NewAdaptiveScaler ¶
func NewAdaptiveScaler( taskListID *Identifier, tlMgr Manager, qpsTracker stats.QPSTracker, config *config.TaskListConfig, timeSource clock.TimeSource, logger log.Logger, scope metrics.Scope, matchingClient matching.Client, ) AdaptiveScaler
type AddTaskParams ¶
type AddTaskParams struct { TaskInfo *persistence.TaskInfo Source types.TaskSource ForwardedFrom string ActivityTaskDispatchInfo *types.ActivityTaskDispatchInfo }
type DomainIsActiveInThisClusterError ¶
type DomainIsActiveInThisClusterError struct {
Message string
}
DomainIsActiveInThisClusterError type
func (*DomainIsActiveInThisClusterError) Error ¶
func (e *DomainIsActiveInThisClusterError) Error() string
Implement the Error method for DomainIsActiveInThisClusterError
type Forwarder ¶
type Forwarder interface { ForwardTask(ctx context.Context, task *InternalTask) error ForwardQueryTask(ctx context.Context, task *InternalTask) (*types.QueryWorkflowResponse, error) ForwardPoll(ctx context.Context) (*InternalTask, error) AddReqTokenC() <-chan *ForwarderReqToken PollReqTokenC(isolationGroup string) <-chan *ForwarderReqToken }
type ForwarderReqToken ¶
type ForwarderReqToken struct {
// contains filtered or unexported fields
}
ForwarderReqToken is the token that must be acquired before making forwarder API calls. This type contains the state for the token itself
type Identifier ¶
type Identifier struct {
// contains filtered or unexported fields
}
Identifier is the key that uniquely identifies a task list
func NewIdentifier ¶
func NewIdentifier( domainID string, taskListName string, taskType int, ) (*Identifier, error)
NewIdentifier returns identifier which uniquely identifies as task list
func NewTestTaskListID ¶
func (*Identifier) GetDomainID ¶
func (tid *Identifier) GetDomainID() string
GetDomainID returns the domain ID of the task list
func (*Identifier) GetName ¶
func (tn *Identifier) GetName() string
GetName returns the name of the task list
func (*Identifier) GetPartition ¶
func (*Identifier) GetRoot ¶
func (tn *Identifier) GetRoot() string
GetRoot returns the root name for a task list
func (*Identifier) GetType ¶
func (tid *Identifier) GetType() int
GetType returns the task type of the task list
func (*Identifier) IsRoot ¶
func (tn *Identifier) IsRoot() bool
IsRoot returns true if this task list is a root partition
func (*Identifier) Parent ¶
Parent returns the name of the parent task list input:
degree: Number of children at each level of the tree
Returns empty string if this task list is the root
func (*Identifier) String ¶
func (tid *Identifier) String() string
type InternalTask ¶
type InternalTask struct { Event *genericTaskInfo // non-nil for activity or decision task that's locally generated Query *queryTaskInfo // non-nil for a query task that's locally sync matched ResponseC chan error // non-nil only where there is a caller waiting for response (sync-match) BacklogCountHint int64 ActivityTaskDispatchInfo *types.ActivityTaskDispatchInfo // contains filtered or unexported fields }
InternalTask represents an activity, decision, query or started (received from another host). this struct is more like a union and only one of [ query, event, forwarded ] is non-nil for any given task
func (*InternalTask) Finish ¶
func (task *InternalTask) Finish(err error)
finish marks a task as finished. Should be called after a poller picks up a task and marks it as started. If the task is unable to marked as started, then this method should be called with a non-nil error argument.
func (*InternalTask) Info ¶ added in v1.2.13
func (task *InternalTask) Info() persistence.TaskInfo
func (*InternalTask) IsForwarded ¶
func (task *InternalTask) IsForwarded() bool
isForwarded returns true if the underlying task is forwarded by a remote matching host forwarded tasks are already marked as started in history
func (*InternalTask) IsQuery ¶
func (task *InternalTask) IsQuery() bool
isQuery returns true if the underlying task is a query task
func (*InternalTask) IsStarted ¶
func (task *InternalTask) IsStarted() bool
isStarted is true when this task is already marked as started
func (*InternalTask) IsSyncMatch ¶
func (task *InternalTask) IsSyncMatch() bool
func (*InternalTask) PollForActivityResponse ¶
func (task *InternalTask) PollForActivityResponse() *types.MatchingPollForActivityTaskResponse
pollForActivityResponse returns the poll response for an activity task that is already marked as started. This method should only be called when isStarted() is true
func (*InternalTask) PollForDecisionResponse ¶
func (task *InternalTask) PollForDecisionResponse() *types.MatchingPollForDecisionTaskResponse
pollForDecisionResponse returns the poll response for a decision task that is already marked as started. This method should only be called when isStarted() is true
func (*InternalTask) WorkflowExecution ¶
func (task *InternalTask) WorkflowExecution() *types.WorkflowExecution
type Manager ¶
type Manager interface { Start() error Stop() // AddTask adds a task to the task list. This method will first attempt a synchronous // match with a poller. When that fails, task will be written to database and later // asynchronously matched with a poller AddTask(ctx context.Context, params AddTaskParams) (syncMatch bool, err error) // GetTask blocks waiting for a task Returns error when context deadline is exceeded // maxDispatchPerSecond is the max rate at which tasks are allowed to be dispatched // from this task list to pollers GetTask(ctx context.Context, maxDispatchPerSecond *float64) (*InternalTask, error) // DispatchTask dispatches a task to a poller. When there are no pollers to pick // up the task, this method will return error. Task will not be persisted to db DispatchTask(ctx context.Context, task *InternalTask) error // DispatchQueryTask will dispatch query to local or remote poller. If forwarded then result or error is returned, // if dispatched to local poller then nil and nil is returned. DispatchQueryTask(ctx context.Context, taskID string, request *types.MatchingQueryWorkflowRequest) (*types.QueryWorkflowResponse, error) CancelPoller(pollerID string) GetAllPollerInfo() []*types.PollerInfo HasPollerAfter(accessTime time.Time) bool // DescribeTaskList returns information about the target tasklist DescribeTaskList(includeTaskListStatus bool) *types.DescribeTaskListResponse String() string GetTaskListKind() types.TaskListKind TaskListID() *Identifier TaskListPartitionConfig() *types.TaskListPartitionConfig UpdateTaskListPartitionConfig(context.Context, *types.TaskListPartitionConfig) error RefreshTaskListPartitionConfig(context.Context, *types.TaskListPartitionConfig) error LoadBalancerHints() *types.LoadBalancerHints }
func NewManager ¶
func NewManager( domainCache cache.DomainCache, logger log.Logger, metricsClient metrics.Client, taskManager persistence.TaskManager, clusterMetadata cluster.Metadata, partitioner partition.Partitioner, matchingClient matching.Client, closeCallback func(Manager), taskList *Identifier, taskListKind *types.TaskListKind, cfg *config.Config, timeSource clock.TimeSource, createTime time.Time, historyService history.Client, ) (Manager, error)
type MockForwarder ¶
type MockForwarder struct {
// contains filtered or unexported fields
}
MockForwarder is a mock of Forwarder interface.
func NewMockForwarder ¶
func NewMockForwarder(ctrl *gomock.Controller) *MockForwarder
NewMockForwarder creates a new mock instance.
func (*MockForwarder) AddReqTokenC ¶
func (m *MockForwarder) AddReqTokenC() <-chan *ForwarderReqToken
AddReqTokenC mocks base method.
func (*MockForwarder) EXPECT ¶
func (m *MockForwarder) EXPECT() *MockForwarderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockForwarder) ForwardPoll ¶
func (m *MockForwarder) ForwardPoll(ctx context.Context) (*InternalTask, error)
ForwardPoll mocks base method.
func (*MockForwarder) ForwardQueryTask ¶
func (m *MockForwarder) ForwardQueryTask(ctx context.Context, task *InternalTask) (*types.QueryWorkflowResponse, error)
ForwardQueryTask mocks base method.
func (*MockForwarder) ForwardTask ¶
func (m *MockForwarder) ForwardTask(ctx context.Context, task *InternalTask) error
ForwardTask mocks base method.
func (*MockForwarder) PollReqTokenC ¶
func (m *MockForwarder) PollReqTokenC(isolationGroup string) <-chan *ForwarderReqToken
PollReqTokenC mocks base method.
type MockForwarderMockRecorder ¶
type MockForwarderMockRecorder struct {
// contains filtered or unexported fields
}
MockForwarderMockRecorder is the mock recorder for MockForwarder.
func (*MockForwarderMockRecorder) AddReqTokenC ¶
func (mr *MockForwarderMockRecorder) AddReqTokenC() *gomock.Call
AddReqTokenC indicates an expected call of AddReqTokenC.
func (*MockForwarderMockRecorder) ForwardPoll ¶
func (mr *MockForwarderMockRecorder) ForwardPoll(ctx interface{}) *gomock.Call
ForwardPoll indicates an expected call of ForwardPoll.
func (*MockForwarderMockRecorder) ForwardQueryTask ¶
func (mr *MockForwarderMockRecorder) ForwardQueryTask(ctx, task interface{}) *gomock.Call
ForwardQueryTask indicates an expected call of ForwardQueryTask.
func (*MockForwarderMockRecorder) ForwardTask ¶
func (mr *MockForwarderMockRecorder) ForwardTask(ctx, task interface{}) *gomock.Call
ForwardTask indicates an expected call of ForwardTask.
func (*MockForwarderMockRecorder) PollReqTokenC ¶
func (mr *MockForwarderMockRecorder) PollReqTokenC(isolationGroup interface{}) *gomock.Call
PollReqTokenC indicates an expected call of PollReqTokenC.
type MockManager ¶ added in v1.2.11
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface.
func NewMockManager ¶ added in v1.2.11
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance.
func (*MockManager) AddTask ¶ added in v1.2.11
func (m *MockManager) AddTask(ctx context.Context, params AddTaskParams) (bool, error)
AddTask mocks base method.
func (*MockManager) CancelPoller ¶ added in v1.2.11
func (m *MockManager) CancelPoller(pollerID string)
CancelPoller mocks base method.
func (*MockManager) DescribeTaskList ¶ added in v1.2.11
func (m *MockManager) DescribeTaskList(includeTaskListStatus bool) *types.DescribeTaskListResponse
DescribeTaskList mocks base method.
func (*MockManager) DispatchQueryTask ¶ added in v1.2.11
func (m *MockManager) DispatchQueryTask(ctx context.Context, taskID string, request *types.MatchingQueryWorkflowRequest) (*types.QueryWorkflowResponse, error)
DispatchQueryTask mocks base method.
func (*MockManager) DispatchTask ¶ added in v1.2.11
func (m *MockManager) DispatchTask(ctx context.Context, task *InternalTask) error
DispatchTask mocks base method.
func (*MockManager) EXPECT ¶ added in v1.2.11
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockManager) GetAllPollerInfo ¶ added in v1.2.11
func (m *MockManager) GetAllPollerInfo() []*types.PollerInfo
GetAllPollerInfo mocks base method.
func (*MockManager) GetTask ¶ added in v1.2.11
func (m *MockManager) GetTask(ctx context.Context, maxDispatchPerSecond *float64) (*InternalTask, error)
GetTask mocks base method.
func (*MockManager) GetTaskListKind ¶ added in v1.2.11
func (m *MockManager) GetTaskListKind() types.TaskListKind
GetTaskListKind mocks base method.
func (*MockManager) HasPollerAfter ¶ added in v1.2.11
func (m *MockManager) HasPollerAfter(accessTime time.Time) bool
HasPollerAfter mocks base method.
func (*MockManager) LoadBalancerHints ¶
func (m *MockManager) LoadBalancerHints() *types.LoadBalancerHints
LoadBalancerHints mocks base method.
func (*MockManager) RefreshTaskListPartitionConfig ¶
func (m *MockManager) RefreshTaskListPartitionConfig(arg0 context.Context, arg1 *types.TaskListPartitionConfig) error
RefreshTaskListPartitionConfig mocks base method.
func (*MockManager) Start ¶ added in v1.2.11
func (m *MockManager) Start() error
Start mocks base method.
func (*MockManager) String ¶ added in v1.2.11
func (m *MockManager) String() string
String mocks base method.
func (*MockManager) TaskListID ¶ added in v1.2.11
func (m *MockManager) TaskListID() *Identifier
TaskListID mocks base method.
func (*MockManager) TaskListPartitionConfig ¶
func (m *MockManager) TaskListPartitionConfig() *types.TaskListPartitionConfig
TaskListPartitionConfig mocks base method.
func (*MockManager) UpdateTaskListPartitionConfig ¶
func (m *MockManager) UpdateTaskListPartitionConfig(arg0 context.Context, arg1 *types.TaskListPartitionConfig) error
UpdateTaskListPartitionConfig mocks base method.
type MockManagerMockRecorder ¶ added in v1.2.11
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager.
func (*MockManagerMockRecorder) AddTask ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) AddTask(ctx, params interface{}) *gomock.Call
AddTask indicates an expected call of AddTask.
func (*MockManagerMockRecorder) CancelPoller ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) CancelPoller(pollerID interface{}) *gomock.Call
CancelPoller indicates an expected call of CancelPoller.
func (*MockManagerMockRecorder) DescribeTaskList ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) DescribeTaskList(includeTaskListStatus interface{}) *gomock.Call
DescribeTaskList indicates an expected call of DescribeTaskList.
func (*MockManagerMockRecorder) DispatchQueryTask ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) DispatchQueryTask(ctx, taskID, request interface{}) *gomock.Call
DispatchQueryTask indicates an expected call of DispatchQueryTask.
func (*MockManagerMockRecorder) DispatchTask ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) DispatchTask(ctx, task interface{}) *gomock.Call
DispatchTask indicates an expected call of DispatchTask.
func (*MockManagerMockRecorder) GetAllPollerInfo ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) GetAllPollerInfo() *gomock.Call
GetAllPollerInfo indicates an expected call of GetAllPollerInfo.
func (*MockManagerMockRecorder) GetTask ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) GetTask(ctx, maxDispatchPerSecond interface{}) *gomock.Call
GetTask indicates an expected call of GetTask.
func (*MockManagerMockRecorder) GetTaskListKind ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) GetTaskListKind() *gomock.Call
GetTaskListKind indicates an expected call of GetTaskListKind.
func (*MockManagerMockRecorder) HasPollerAfter ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) HasPollerAfter(accessTime interface{}) *gomock.Call
HasPollerAfter indicates an expected call of HasPollerAfter.
func (*MockManagerMockRecorder) LoadBalancerHints ¶
func (mr *MockManagerMockRecorder) LoadBalancerHints() *gomock.Call
LoadBalancerHints indicates an expected call of LoadBalancerHints.
func (*MockManagerMockRecorder) RefreshTaskListPartitionConfig ¶
func (mr *MockManagerMockRecorder) RefreshTaskListPartitionConfig(arg0, arg1 interface{}) *gomock.Call
RefreshTaskListPartitionConfig indicates an expected call of RefreshTaskListPartitionConfig.
func (*MockManagerMockRecorder) Start ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockManagerMockRecorder) Stop ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
func (*MockManagerMockRecorder) String ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) String() *gomock.Call
String indicates an expected call of String.
func (*MockManagerMockRecorder) TaskListID ¶ added in v1.2.11
func (mr *MockManagerMockRecorder) TaskListID() *gomock.Call
TaskListID indicates an expected call of TaskListID.
func (*MockManagerMockRecorder) TaskListPartitionConfig ¶
func (mr *MockManagerMockRecorder) TaskListPartitionConfig() *gomock.Call
TaskListPartitionConfig indicates an expected call of TaskListPartitionConfig.
func (*MockManagerMockRecorder) UpdateTaskListPartitionConfig ¶
func (mr *MockManagerMockRecorder) UpdateTaskListPartitionConfig(arg0, arg1 interface{}) *gomock.Call
UpdateTaskListPartitionConfig indicates an expected call of UpdateTaskListPartitionConfig.
type MockTaskCompleter ¶
type MockTaskCompleter struct {
// contains filtered or unexported fields
}
MockTaskCompleter is a mock of TaskCompleter interface.
func NewMockTaskCompleter ¶
func NewMockTaskCompleter(ctrl *gomock.Controller) *MockTaskCompleter
NewMockTaskCompleter creates a new mock instance.
func (*MockTaskCompleter) CompleteTaskIfStarted ¶
func (m *MockTaskCompleter) CompleteTaskIfStarted(ctx context.Context, task *InternalTask) error
CompleteTaskIfStarted mocks base method.
func (*MockTaskCompleter) EXPECT ¶
func (m *MockTaskCompleter) EXPECT() *MockTaskCompleterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockTaskCompleterMockRecorder ¶
type MockTaskCompleterMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskCompleterMockRecorder is the mock recorder for MockTaskCompleter.
func (*MockTaskCompleterMockRecorder) CompleteTaskIfStarted ¶
func (mr *MockTaskCompleterMockRecorder) CompleteTaskIfStarted(ctx, task interface{}) *gomock.Call
CompleteTaskIfStarted indicates an expected call of CompleteTaskIfStarted.
type MockTaskMatcher ¶ added in v1.2.14
type MockTaskMatcher struct {
// contains filtered or unexported fields
}
MockTaskMatcher is a mock of TaskMatcher interface.
func NewMockTaskMatcher ¶ added in v1.2.14
func NewMockTaskMatcher(ctrl *gomock.Controller) *MockTaskMatcher
NewMockTaskMatcher creates a new mock instance.
func (*MockTaskMatcher) DisconnectBlockedPollers ¶ added in v1.2.14
func (m *MockTaskMatcher) DisconnectBlockedPollers()
DisconnectBlockedPollers mocks base method.
func (*MockTaskMatcher) EXPECT ¶ added in v1.2.14
func (m *MockTaskMatcher) EXPECT() *MockTaskMatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTaskMatcher) MustOffer ¶ added in v1.2.14
func (m *MockTaskMatcher) MustOffer(ctx context.Context, task *InternalTask) error
MustOffer mocks base method.
func (*MockTaskMatcher) Offer ¶ added in v1.2.14
func (m *MockTaskMatcher) Offer(ctx context.Context, task *InternalTask) (bool, error)
Offer mocks base method.
func (*MockTaskMatcher) OfferOrTimeout ¶ added in v1.2.14
func (m *MockTaskMatcher) OfferOrTimeout(ctx context.Context, startT time.Time, task *InternalTask) (bool, error)
OfferOrTimeout mocks base method.
func (*MockTaskMatcher) OfferQuery ¶ added in v1.2.14
func (m *MockTaskMatcher) OfferQuery(ctx context.Context, task *InternalTask) (*types.QueryWorkflowResponse, error)
OfferQuery mocks base method.
func (*MockTaskMatcher) Poll ¶ added in v1.2.14
func (m *MockTaskMatcher) Poll(ctx context.Context, isolationGroup string) (*InternalTask, error)
Poll mocks base method.
func (*MockTaskMatcher) PollForQuery ¶ added in v1.2.14
func (m *MockTaskMatcher) PollForQuery(ctx context.Context) (*InternalTask, error)
PollForQuery mocks base method.
func (*MockTaskMatcher) Rate ¶ added in v1.2.14
func (m *MockTaskMatcher) Rate() float64
Rate mocks base method.
func (*MockTaskMatcher) UpdateRatelimit ¶ added in v1.2.14
func (m *MockTaskMatcher) UpdateRatelimit(rps *float64)
UpdateRatelimit mocks base method.
type MockTaskMatcherMockRecorder ¶ added in v1.2.14
type MockTaskMatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskMatcherMockRecorder is the mock recorder for MockTaskMatcher.
func (*MockTaskMatcherMockRecorder) DisconnectBlockedPollers ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) DisconnectBlockedPollers() *gomock.Call
DisconnectBlockedPollers indicates an expected call of DisconnectBlockedPollers.
func (*MockTaskMatcherMockRecorder) MustOffer ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) MustOffer(ctx, task interface{}) *gomock.Call
MustOffer indicates an expected call of MustOffer.
func (*MockTaskMatcherMockRecorder) Offer ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) Offer(ctx, task interface{}) *gomock.Call
Offer indicates an expected call of Offer.
func (*MockTaskMatcherMockRecorder) OfferOrTimeout ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) OfferOrTimeout(ctx, startT, task interface{}) *gomock.Call
OfferOrTimeout indicates an expected call of OfferOrTimeout.
func (*MockTaskMatcherMockRecorder) OfferQuery ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) OfferQuery(ctx, task interface{}) *gomock.Call
OfferQuery indicates an expected call of OfferQuery.
func (*MockTaskMatcherMockRecorder) Poll ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) Poll(ctx, isolationGroup interface{}) *gomock.Call
Poll indicates an expected call of Poll.
func (*MockTaskMatcherMockRecorder) PollForQuery ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) PollForQuery(ctx interface{}) *gomock.Call
PollForQuery indicates an expected call of PollForQuery.
func (*MockTaskMatcherMockRecorder) Rate ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) Rate() *gomock.Call
Rate indicates an expected call of Rate.
func (*MockTaskMatcherMockRecorder) UpdateRatelimit ¶ added in v1.2.14
func (mr *MockTaskMatcherMockRecorder) UpdateRatelimit(rps interface{}) *gomock.Call
UpdateRatelimit indicates an expected call of UpdateRatelimit.
type TaskCompleter ¶
type TaskCompleter interface {
CompleteTaskIfStarted(ctx context.Context, task *InternalTask) error
}
type TaskMatcher ¶
type TaskMatcher interface { DisconnectBlockedPollers() Offer(ctx context.Context, task *InternalTask) (bool, error) OfferOrTimeout(ctx context.Context, startT time.Time, task *InternalTask) (bool, error) OfferQuery(ctx context.Context, task *InternalTask) (*types.QueryWorkflowResponse, error) MustOffer(ctx context.Context, task *InternalTask) error Poll(ctx context.Context, isolationGroup string) (*InternalTask, error) PollForQuery(ctx context.Context) (*InternalTask, error) UpdateRatelimit(rps *float64) Rate() float64 }
type TestTaskManager ¶
func NewTestTaskManager ¶
func NewTestTaskManager(t *testing.T, logger log.Logger, timeSource clock.TimeSource) *TestTaskManager
func (*TestTaskManager) Close ¶
func (m *TestTaskManager) Close()
func (*TestTaskManager) CompleteTask ¶
func (m *TestTaskManager) CompleteTask( _ context.Context, request *persistence.CompleteTaskRequest, ) error
CompleteTask provides a mock function with given fields: ctx, request
func (*TestTaskManager) CompleteTasksLessThan ¶
func (m *TestTaskManager) CompleteTasksLessThan( _ context.Context, request *persistence.CompleteTasksLessThanRequest, ) (*persistence.CompleteTasksLessThanResponse, error)
CompleteTasksLessThan provides a mock function with given fields: ctx, request
func (*TestTaskManager) CreateTasks ¶
func (m *TestTaskManager) CreateTasks( _ context.Context, request *persistence.CreateTasksRequest, ) (*persistence.CreateTasksResponse, error)
CreateTask provides a mock function with given fields: ctx, request
func (*TestTaskManager) DeleteTaskList ¶
func (m *TestTaskManager) DeleteTaskList( _ context.Context, request *persistence.DeleteTaskListRequest, ) error
DeleteTaskList provides a mock function with given fields: ctx, request
func (*TestTaskManager) GetCreateTaskCount ¶
func (m *TestTaskManager) GetCreateTaskCount(taskList *Identifier) int
getCreateTaskCount returns how many times CreateTask was called
func (*TestTaskManager) GetName ¶
func (m *TestTaskManager) GetName() string
func (*TestTaskManager) GetOrphanTasks ¶
func (m *TestTaskManager) GetOrphanTasks(_ context.Context, request *persistence.GetOrphanTasksRequest) (*persistence.GetOrphanTasksResponse, error)
func (*TestTaskManager) GetRangeID ¶
func (m *TestTaskManager) GetRangeID(taskList *Identifier) int64
func (*TestTaskManager) GetTaskCount ¶
func (m *TestTaskManager) GetTaskCount(taskList *Identifier) int
getTaskCount returns number of tasks in a task list
func (*TestTaskManager) GetTaskList ¶
func (m *TestTaskManager) GetTaskList( _ context.Context, request *persistence.GetTaskListRequest, ) (*persistence.GetTaskListResponse, error)
func (*TestTaskManager) GetTaskListSize ¶
func (m *TestTaskManager) GetTaskListSize(_ context.Context, request *persistence.GetTaskListSizeRequest) (*persistence.GetTaskListSizeResponse, error)
func (*TestTaskManager) GetTasks ¶
func (m *TestTaskManager) GetTasks( _ context.Context, request *persistence.GetTasksRequest, ) (*persistence.GetTasksResponse, error)
GetTasks provides a mock function with given fields: ctx, request
func (*TestTaskManager) LeaseTaskList ¶
func (m *TestTaskManager) LeaseTaskList( _ context.Context, request *persistence.LeaseTaskListRequest, ) (*persistence.LeaseTaskListResponse, error)
LeaseTaskList provides a mock function with given fields: ctx, request
func (*TestTaskManager) ListTaskList ¶
func (m *TestTaskManager) ListTaskList( _ context.Context, request *persistence.ListTaskListRequest, ) (*persistence.ListTaskListResponse, error)
ListTaskList provides a mock function with given fields: ctx, request
func (*TestTaskManager) SetRangeID ¶
func (m *TestTaskManager) SetRangeID(taskList *Identifier, rangeID int64)
func (*TestTaskManager) String ¶
func (m *TestTaskManager) String() string
func (*TestTaskManager) UpdateTaskList ¶
func (m *TestTaskManager) UpdateTaskList( _ context.Context, request *persistence.UpdateTaskListRequest, ) (*persistence.UpdateTaskListResponse, error)
UpdateTaskList provides a mock function with given fields: ctx, request