matching

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2017 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 Engine

type Engine interface {
	Stop()
	AddDecisionTask(addRequest *m.AddDecisionTaskRequest) error
	AddActivityTask(addRequest *m.AddActivityTaskRequest) error
	PollForDecisionTask(ctx thrift.Context, request *m.PollForDecisionTaskRequest) (*m.PollForDecisionTaskResponse, error)
	PollForActivityTask(ctx thrift.Context, request *m.PollForActivityTaskRequest) (*workflow.PollForActivityTaskResponse, error)
}

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

func NewEngine

func NewEngine(taskManager persistence.TaskManager,
	historyService history.Client,
	logger bark.Logger,
	metricsClient metrics.Client) Engine

NewEngine creates an instance of matching engine

type Handler

type Handler struct {
	service.Service
	// contains filtered or unexported fields
}

Handler - Thrift handler inteface for history service

func NewHandler

func NewHandler(taskPersistence persistence.TaskManager, sVice service.Service) (*Handler, []thrift.TChanServer)

NewHandler creates a thrift handler for the history service

func (*Handler) AddActivityTask

func (h *Handler) AddActivityTask(ctx thrift.Context, addRequest *m.AddActivityTaskRequest) error

AddActivityTask - adds an activity task.

func (*Handler) AddDecisionTask

func (h *Handler) AddDecisionTask(ctx thrift.Context, addRequest *m.AddDecisionTaskRequest) error

AddDecisionTask - adds a decision task.

func (*Handler) IsHealthy

func (h *Handler) IsHealthy(ctx thrift.Context) (bool, error)

IsHealthy - Health endpoint.

func (*Handler) PollForActivityTask

func (h *Handler) PollForActivityTask(ctx thrift.Context,
	pollRequest *m.PollForActivityTaskRequest) (*gen.PollForActivityTaskResponse, error)

PollForActivityTask - long poll for an activity task.

func (*Handler) PollForDecisionTask

func (h *Handler) PollForDecisionTask(ctx thrift.Context,
	pollRequest *m.PollForDecisionTaskRequest) (*m.PollForDecisionTaskResponse, error)

PollForDecisionTask - long poll for a decision task.

func (*Handler) Start

func (h *Handler) Start(thriftService []thrift.TChanServer) error

Start starts the handler

func (*Handler) Stop

func (h *Handler) Stop()

Stop stops the handler

type Service

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

Service represents the cadence-matching service

func (*Service) Start

func (s *Service) Start()

Start starts the service

func (*Service) Stop

func (s *Service) Stop()

Stop stops the service

Jump to

Keyboard shortcuts

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