Documentation
¶
Index ¶
- Variables
- func NewService(params *service.BootstrapParams) common.Daemon
- type Config
- type Engine
- type Handler
- func (h *Handler) AddActivityTask(ctx context.Context, addRequest *m.AddActivityTaskRequest) (retError error)
- func (h *Handler) AddDecisionTask(ctx context.Context, addRequest *m.AddDecisionTaskRequest) (retError error)
- func (h *Handler) CancelOutstandingPoll(ctx context.Context, request *m.CancelOutstandingPollRequest) (retError error)
- func (h *Handler) DescribeTaskList(ctx context.Context, request *m.DescribeTaskListRequest) (resp *gen.DescribeTaskListResponse, retError error)
- func (h *Handler) Health(ctx context.Context) (*health.HealthStatus, error)
- func (h *Handler) PollForActivityTask(ctx context.Context, pollRequest *m.PollForActivityTaskRequest) (resp *gen.PollForActivityTaskResponse, retError error)
- func (h *Handler) PollForDecisionTask(ctx context.Context, pollRequest *m.PollForDecisionTaskRequest) (resp *m.PollForDecisionTaskResponse, retError error)
- func (h *Handler) QueryWorkflow(ctx context.Context, queryRequest *m.QueryWorkflowRequest) (resp *gen.QueryWorkflowResponse, retError error)
- func (h *Handler) RespondQueryTaskCompleted(ctx context.Context, request *m.RespondQueryTaskCompletedRequest) (retError error)
- func (h *Handler) Start() error
- func (h *Handler) Stop()
- type Service
Constants ¶
This section is empty.
Variables ¶
var (
// ErrNoTasks is exported temporarily for integration test
ErrNoTasks = errors.New("No tasks")
)
Functions ¶
func NewService ¶
func NewService(params *service.BootstrapParams) common.Daemon
NewService builds a new cadence-matching service
Types ¶
type Config ¶ added in v0.3.0
type Config struct {
PersistenceMaxQPS dynamicconfig.IntPropertyFn
EnableSyncMatch dynamicconfig.BoolPropertyFnWithTaskListInfoFilters
RPS dynamicconfig.IntPropertyFn
// taskListManager configuration
RangeSize int64
GetTasksBatchSize dynamicconfig.IntPropertyFnWithTaskListInfoFilters
UpdateAckInterval dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
IdleTasklistCheckInterval dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
MaxTasklistIdleTime dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
// Time to hold a poll request before returning an empty response if there are no tasks
LongPollExpirationInterval dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
MinTaskThrottlingBurstSize dynamicconfig.IntPropertyFnWithTaskListInfoFilters
MaxTaskDeleteBatchSize dynamicconfig.IntPropertyFnWithTaskListInfoFilters
// taskWriter configuration
OutstandingTaskAppendsThreshold dynamicconfig.IntPropertyFnWithTaskListInfoFilters
MaxTaskBatchSize dynamicconfig.IntPropertyFnWithTaskListInfoFilters
ThrottledLogRPS dynamicconfig.IntPropertyFn
}
Config represents configuration for cadence-matching service
type Engine ¶
type Engine interface {
Stop()
AddDecisionTask(addRequest *m.AddDecisionTaskRequest) (syncMatch bool, err error)
AddActivityTask(addRequest *m.AddActivityTaskRequest) (syncMatch bool, err error)
PollForDecisionTask(ctx context.Context, request *m.PollForDecisionTaskRequest) (*m.PollForDecisionTaskResponse, error)
PollForActivityTask(ctx context.Context, request *m.PollForActivityTaskRequest) (*workflow.PollForActivityTaskResponse, error)
QueryWorkflow(ctx context.Context, request *m.QueryWorkflowRequest) (*workflow.QueryWorkflowResponse, error)
RespondQueryTaskCompleted(ctx context.Context, request *m.RespondQueryTaskCompletedRequest) error
CancelOutstandingPoll(ctx context.Context, request *m.CancelOutstandingPollRequest) error
DescribeTaskList(ctx context.Context, request *m.DescribeTaskListRequest) (*workflow.DescribeTaskListResponse, error)
}
Engine exposes interfaces for clients to poll for activity and decision tasks.
type Handler ¶
type Handler struct {
service.Service
// contains filtered or unexported fields
}
Handler - Thrift handler inteface for history service
func NewHandler ¶
func NewHandler(sVice service.Service, config *Config, taskPersistence persistence.TaskManager, metadataMgr persistence.MetadataManager) *Handler
NewHandler creates a thrift handler for the history service
func (*Handler) AddActivityTask ¶
func (h *Handler) AddActivityTask(ctx context.Context, addRequest *m.AddActivityTaskRequest) (retError error)
AddActivityTask - adds an activity task.
func (*Handler) AddDecisionTask ¶
func (h *Handler) AddDecisionTask(ctx context.Context, addRequest *m.AddDecisionTaskRequest) (retError error)
AddDecisionTask - adds a decision task.
func (*Handler) CancelOutstandingPoll ¶ added in v0.3.2
func (h *Handler) CancelOutstandingPoll(ctx context.Context,
request *m.CancelOutstandingPollRequest) (retError error)
CancelOutstandingPoll is used to cancel outstanding pollers
func (*Handler) DescribeTaskList ¶ added in v0.3.5
func (h *Handler) DescribeTaskList(ctx context.Context, request *m.DescribeTaskListRequest) (resp *gen.DescribeTaskListResponse, retError error)
DescribeTaskList returns information about the target tasklist, right now this API returns the pollers which polled this tasklist in last few minutes. If includeTaskListStatus field is true, it will also return status of tasklist's ackManager (readLevel, ackLevel, backlogCountHint and taskIDBlock).
func (*Handler) Health ¶ added in v0.3.0
func (h *Handler) Health(ctx context.Context) (*health.HealthStatus, error)
Health is for health check
func (*Handler) PollForActivityTask ¶
func (h *Handler) PollForActivityTask(ctx context.Context,
pollRequest *m.PollForActivityTaskRequest) (resp *gen.PollForActivityTaskResponse, retError error)
PollForActivityTask - long poll for an activity task.
func (*Handler) PollForDecisionTask ¶
func (h *Handler) PollForDecisionTask(ctx context.Context,
pollRequest *m.PollForDecisionTaskRequest) (resp *m.PollForDecisionTaskResponse, retError error)
PollForDecisionTask - long poll for a decision task.
func (*Handler) QueryWorkflow ¶ added in v0.3.2
func (h *Handler) QueryWorkflow(ctx context.Context,
queryRequest *m.QueryWorkflowRequest) (resp *gen.QueryWorkflowResponse, retError error)
QueryWorkflow queries a given workflow synchronously and return the query result.
func (*Handler) RespondQueryTaskCompleted ¶ added in v0.3.2
func (h *Handler) RespondQueryTaskCompleted(ctx context.Context, request *m.RespondQueryTaskCompletedRequest) (retError error)
RespondQueryTaskCompleted responds a query task completed