frontend

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: MIT Imports: 32 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidDomainStatus is the error to indicate invalid domain status
	ErrInvalidDomainStatus = errors.New("invalid domain status attribute")
)

Functions

func NewService

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

NewService builds a new cadence-frontend service

Types

type AdminHandler added in v0.3.12

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

AdminHandler - Thrift handler inteface for admin service

func NewAdminHandler added in v0.3.12

func NewAdminHandler(
	sVice service.Service, numberOfHistoryShards int) *AdminHandler

NewAdminHandler creates a thrift handler for the cadence admin service

func (*AdminHandler) InquiryWorkflowExecution added in v0.3.12

InquiryWorkflowExecution returns information about the specified workflow execution.

func (*AdminHandler) Start added in v0.3.12

func (adh *AdminHandler) Start() error

Start starts the handler

func (*AdminHandler) Stop added in v0.3.12

func (adh *AdminHandler) Stop()

Stop stops the handler

type Config added in v0.3.0

type Config struct {
	DefaultVisibilityMaxPageSize int32
	DefaultHistoryMaxPageSize    int32
	RPS                          int

	// Persistence settings
	HistoryMgrNumConns int
}

Config represents configuration for cadence-frontend service

func NewConfig added in v0.3.0

func NewConfig() *Config

NewConfig returns new service config with default values

type DomainReplicator added in v0.3.7

type DomainReplicator interface {
	HandleTransmissionTask(domainOperation replicator.DomainOperation, info *persistence.DomainInfo,
		config *persistence.DomainConfig, replicationConfig *persistence.DomainReplicationConfig,
		configVersion int64, failoverVersion int64) error
}

DomainReplicator is the interface which can replicate the domain

func NewDomainReplicator added in v0.3.7

func NewDomainReplicator(kafka messaging.Producer, logger bark.Logger) DomainReplicator

NewDomainReplicator create a new instance odf domain replicator

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, config *Config, metadataMgr persistence.MetadataManager,
	historyMgr persistence.HistoryManager, visibilityMgr persistence.VisibilityManager,
	kafkaProducer messaging.Producer) *WorkflowHandler

NewWorkflowHandler creates a thrift handler for the cadence service

func (*WorkflowHandler) DeprecateDomain

func (wh *WorkflowHandler) DeprecateDomain(ctx context.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 context.Context,
	describeRequest *gen.DescribeDomainRequest) (*gen.DescribeDomainResponse, error)

DescribeDomain returns the information and configuration for a registered domain.

func (*WorkflowHandler) DescribeTaskList added in v0.3.5

DescribeTaskList returns information about the target tasklist, right now this API returns the pollers which polled this tasklist in last few minutes.

func (*WorkflowHandler) DescribeWorkflowExecution added in v0.3.3

DescribeWorkflowExecution returns information about the specified workflow execution.

func (*WorkflowHandler) GetWorkflowExecutionHistory

GetWorkflowExecutionHistory - retrieves the history of workflow execution

func (*WorkflowHandler) Health added in v0.3.0

Health is for health check

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 context.Context,
	pollRequest *gen.PollForActivityTaskRequest) (*gen.PollForActivityTaskResponse, error)

PollForActivityTask - Poll for an activity task.

func (*WorkflowHandler) PollForDecisionTask

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

PollForDecisionTask - Poll for a decision task.

func (*WorkflowHandler) QueryWorkflow added in v0.3.2

func (wh *WorkflowHandler) QueryWorkflow(ctx context.Context,
	queryRequest *gen.QueryWorkflowRequest) (*gen.QueryWorkflowResponse, error)

QueryWorkflow returns query result for a specified workflow execution

func (*WorkflowHandler) RecordActivityTaskHeartbeat

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

RecordActivityTaskHeartbeat - Record Activity Task Heart beat.

func (*WorkflowHandler) RecordActivityTaskHeartbeatByID added in v0.3.7

func (wh *WorkflowHandler) RecordActivityTaskHeartbeatByID(
	ctx context.Context,
	heartbeatRequest *gen.RecordActivityTaskHeartbeatByIDRequest) (*gen.RecordActivityTaskHeartbeatResponse, error)

RecordActivityTaskHeartbeatByID - Record Activity Task Heart beat.

func (*WorkflowHandler) RegisterDomain

func (wh *WorkflowHandler) RegisterDomain(ctx context.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 context.Context,
	cancelRequest *gen.RequestCancelWorkflowExecutionRequest) error

RequestCancelWorkflowExecution - requests to cancel a workflow execution

func (*WorkflowHandler) ResetStickyTaskList added in v0.3.12

func (wh *WorkflowHandler) ResetStickyTaskList(ctx context.Context, resetRequest *gen.ResetStickyTaskListRequest) (*gen.ResetStickyTaskListResponse, error)

ResetStickyTaskList reset the volatile information in mutable state of a given workflow.

func (*WorkflowHandler) RespondActivityTaskCanceled

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

RespondActivityTaskCanceled - called to cancel an activity task

func (*WorkflowHandler) RespondActivityTaskCanceledByID added in v0.3.3

func (wh *WorkflowHandler) RespondActivityTaskCanceledByID(
	ctx context.Context,
	cancelRequest *gen.RespondActivityTaskCanceledByIDRequest) error

RespondActivityTaskCanceledByID - called to cancel an activity task

func (*WorkflowHandler) RespondActivityTaskCompleted

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

RespondActivityTaskCompleted - response to an activity task

func (*WorkflowHandler) RespondActivityTaskCompletedByID added in v0.3.3

func (wh *WorkflowHandler) RespondActivityTaskCompletedByID(
	ctx context.Context,
	completeRequest *gen.RespondActivityTaskCompletedByIDRequest) error

RespondActivityTaskCompletedByID - response to an activity task

func (*WorkflowHandler) RespondActivityTaskFailed

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

RespondActivityTaskFailed - response to an activity task failure

func (*WorkflowHandler) RespondActivityTaskFailedByID added in v0.3.3

func (wh *WorkflowHandler) RespondActivityTaskFailedByID(
	ctx context.Context,
	failedRequest *gen.RespondActivityTaskFailedByIDRequest) error

RespondActivityTaskFailedByID - response to an activity task failure

func (*WorkflowHandler) RespondDecisionTaskCompleted

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

RespondDecisionTaskCompleted - response to a decision task

func (*WorkflowHandler) RespondDecisionTaskFailed added in v0.3.3

func (wh *WorkflowHandler) RespondDecisionTaskFailed(
	ctx context.Context,
	failedRequest *gen.RespondDecisionTaskFailedRequest) error

RespondDecisionTaskFailed - failed response to a decision task

func (*WorkflowHandler) RespondQueryTaskCompleted added in v0.3.2

func (wh *WorkflowHandler) RespondQueryTaskCompleted(
	ctx context.Context,
	completeRequest *gen.RespondQueryTaskCompletedRequest) error

RespondQueryTaskCompleted - response to a query task

func (*WorkflowHandler) SignalWithStartWorkflowExecution added in v0.3.11

func (wh *WorkflowHandler) SignalWithStartWorkflowExecution(ctx context.Context,
	signalWithStartRequest *gen.SignalWithStartWorkflowExecutionRequest) (*gen.StartWorkflowExecutionResponse, error)

SignalWithStartWorkflowExecution is used to ensure sending a signal event to a workflow execution. If workflow is running, this results in WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution. If workflow is not running or not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled event recorded in history, and a decision task being created for the execution

func (*WorkflowHandler) SignalWorkflowExecution

func (wh *WorkflowHandler) SignalWorkflowExecution(ctx context.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() error

Start starts the handler

func (*WorkflowHandler) StartWorkflowExecution

func (wh *WorkflowHandler) StartWorkflowExecution(
	ctx context.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 context.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 context.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