frontend

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: 18 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(params *service.BootstrapParams) common.Daemon

NewService builds a new cadence-frontend service

Types

type Service

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

Service represents the cadence-frontend service

func (*Service) Start

func (s *Service) Start()

Start starts the service

func (*Service) Stop

func (s *Service) Stop()

Stop stops the service

type WorkflowHandler

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

WorkflowHandler - Thrift handler inteface for workflow service

func NewWorkflowHandler

func NewWorkflowHandler(
	sVice service.Service, metadataMgr persistence.MetadataManager,
	historyMgr persistence.HistoryManager, visibilityMgr persistence.VisibilityManager) (*WorkflowHandler, []thrift.TChanServer)

NewWorkflowHandler creates a thrift handler for the cadence service

func (*WorkflowHandler) DeprecateDomain

func (wh *WorkflowHandler) DeprecateDomain(ctx thrift.Context, deprecateRequest *gen.DeprecateDomainRequest) error

DeprecateDomain us used to update status of a registered domain to DEPRECATED. Once the domain is deprecated it cannot be used to start new workflow executions. Existing workflow executions will continue to run on deprecated domains.

func (*WorkflowHandler) DescribeDomain

func (wh *WorkflowHandler) DescribeDomain(ctx thrift.Context,
	describeRequest *gen.DescribeDomainRequest) (*gen.DescribeDomainResponse, error)

DescribeDomain returns the information and configuration for a registered domain.

func (*WorkflowHandler) GetWorkflowExecutionHistory

GetWorkflowExecutionHistory - retrieves the hisotry of workflow execution

func (*WorkflowHandler) IsHealthy

func (wh *WorkflowHandler) IsHealthy(ctx thrift.Context) (bool, error)

IsHealthy - Health endpoint.

func (*WorkflowHandler) ListClosedWorkflowExecutions

ListClosedWorkflowExecutions - retrieves info for closed workflow executions in a domain

func (*WorkflowHandler) ListOpenWorkflowExecutions

ListOpenWorkflowExecutions - retrieves info for open workflow executions in a domain

func (*WorkflowHandler) PollForActivityTask

func (wh *WorkflowHandler) PollForActivityTask(
	ctx thrift.Context,
	pollRequest *gen.PollForActivityTaskRequest) (*gen.PollForActivityTaskResponse, error)

PollForActivityTask - Poll for an activity task.

func (*WorkflowHandler) PollForDecisionTask

func (wh *WorkflowHandler) PollForDecisionTask(
	ctx thrift.Context,
	pollRequest *gen.PollForDecisionTaskRequest) (*gen.PollForDecisionTaskResponse, error)

PollForDecisionTask - Poll for a decision task.

func (*WorkflowHandler) RecordActivityTaskHeartbeat

func (wh *WorkflowHandler) RecordActivityTaskHeartbeat(
	ctx thrift.Context,
	heartbeatRequest *gen.RecordActivityTaskHeartbeatRequest) (*gen.RecordActivityTaskHeartbeatResponse, error)

RecordActivityTaskHeartbeat - Record Activity Task Heart beat.

func (*WorkflowHandler) RegisterDomain

func (wh *WorkflowHandler) RegisterDomain(ctx thrift.Context, registerRequest *gen.RegisterDomainRequest) error

RegisterDomain creates a new domain which can be used as a container for all resources. Domain is a top level entity within Cadence, used as a container for all resources like workflow executions, tasklists, etc. Domain acts as a sandbox and provides isolation for all resources within the domain. All resources belongs to exactly one domain.

func (*WorkflowHandler) RequestCancelWorkflowExecution

func (wh *WorkflowHandler) RequestCancelWorkflowExecution(
	ctx thrift.Context,
	cancelRequest *gen.RequestCancelWorkflowExecutionRequest) error

RequestCancelWorkflowExecution - requests to cancel a workflow execution

func (*WorkflowHandler) RespondActivityTaskCanceled

func (wh *WorkflowHandler) RespondActivityTaskCanceled(
	ctx thrift.Context,
	cancelRequest *gen.RespondActivityTaskCanceledRequest) error

RespondActivityTaskCanceled - called to cancel an activity task

func (*WorkflowHandler) RespondActivityTaskCompleted

func (wh *WorkflowHandler) RespondActivityTaskCompleted(
	ctx thrift.Context,
	completeRequest *gen.RespondActivityTaskCompletedRequest) error

RespondActivityTaskCompleted - response to an activity task

func (*WorkflowHandler) RespondActivityTaskFailed

func (wh *WorkflowHandler) RespondActivityTaskFailed(
	ctx thrift.Context,
	failedRequest *gen.RespondActivityTaskFailedRequest) error

RespondActivityTaskFailed - response to an activity task failure

func (*WorkflowHandler) RespondDecisionTaskCompleted

func (wh *WorkflowHandler) RespondDecisionTaskCompleted(
	ctx thrift.Context,
	completeRequest *gen.RespondDecisionTaskCompletedRequest) error

RespondDecisionTaskCompleted - response to a decision task

func (*WorkflowHandler) SignalWorkflowExecution

func (wh *WorkflowHandler) SignalWorkflowExecution(ctx thrift.Context,
	signalRequest *gen.SignalWorkflowExecutionRequest) error

SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution.

func (*WorkflowHandler) Start

func (wh *WorkflowHandler) Start(thriftService []thrift.TChanServer) error

Start starts the handler

func (*WorkflowHandler) StartWorkflowExecution

func (wh *WorkflowHandler) StartWorkflowExecution(
	ctx thrift.Context,
	startRequest *gen.StartWorkflowExecutionRequest) (*gen.StartWorkflowExecutionResponse, error)

StartWorkflowExecution - Creates a new workflow execution

func (*WorkflowHandler) Stop

func (wh *WorkflowHandler) Stop()

Stop stops the handler

func (*WorkflowHandler) TerminateWorkflowExecution

func (wh *WorkflowHandler) TerminateWorkflowExecution(ctx thrift.Context,
	terminateRequest *gen.TerminateWorkflowExecutionRequest) error

TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event in the history and immediately terminating the execution instance.

func (*WorkflowHandler) UpdateDomain

func (wh *WorkflowHandler) UpdateDomain(ctx thrift.Context,
	updateRequest *gen.UpdateDomainRequest) (*gen.UpdateDomainResponse, error)

UpdateDomain is used to update the information and configuration for a registered domain.

Jump to

Keyboard shortcuts

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