Documentation ¶
Index ¶
- Variables
- func NewService(params *service.BootstrapParams) common.Daemon
- type Config
- type DomainReplicator
- type Service
- type WorkflowHandler
- func (wh *WorkflowHandler) DeprecateDomain(ctx context.Context, deprecateRequest *gen.DeprecateDomainRequest) error
- func (wh *WorkflowHandler) DescribeDomain(ctx context.Context, describeRequest *gen.DescribeDomainRequest) (*gen.DescribeDomainResponse, error)
- func (wh *WorkflowHandler) DescribeTaskList(ctx context.Context, request *gen.DescribeTaskListRequest) (*gen.DescribeTaskListResponse, error)
- func (wh *WorkflowHandler) DescribeWorkflowExecution(ctx context.Context, request *gen.DescribeWorkflowExecutionRequest) (*gen.DescribeWorkflowExecutionResponse, error)
- func (wh *WorkflowHandler) GetWorkflowExecutionHistory(ctx context.Context, getRequest *gen.GetWorkflowExecutionHistoryRequest) (*gen.GetWorkflowExecutionHistoryResponse, error)
- func (wh *WorkflowHandler) Health(ctx context.Context) (*health.HealthStatus, error)
- func (wh *WorkflowHandler) ListClosedWorkflowExecutions(ctx context.Context, listRequest *gen.ListClosedWorkflowExecutionsRequest) (*gen.ListClosedWorkflowExecutionsResponse, error)
- func (wh *WorkflowHandler) ListOpenWorkflowExecutions(ctx context.Context, listRequest *gen.ListOpenWorkflowExecutionsRequest) (*gen.ListOpenWorkflowExecutionsResponse, error)
- func (wh *WorkflowHandler) PollForActivityTask(ctx context.Context, pollRequest *gen.PollForActivityTaskRequest) (*gen.PollForActivityTaskResponse, error)
- func (wh *WorkflowHandler) PollForDecisionTask(ctx context.Context, pollRequest *gen.PollForDecisionTaskRequest) (*gen.PollForDecisionTaskResponse, error)
- func (wh *WorkflowHandler) QueryWorkflow(ctx context.Context, queryRequest *gen.QueryWorkflowRequest) (*gen.QueryWorkflowResponse, error)
- func (wh *WorkflowHandler) RecordActivityTaskHeartbeat(ctx context.Context, heartbeatRequest *gen.RecordActivityTaskHeartbeatRequest) (*gen.RecordActivityTaskHeartbeatResponse, error)
- func (wh *WorkflowHandler) RecordActivityTaskHeartbeatByID(ctx context.Context, ...) (*gen.RecordActivityTaskHeartbeatResponse, error)
- func (wh *WorkflowHandler) RegisterDomain(ctx context.Context, registerRequest *gen.RegisterDomainRequest) error
- func (wh *WorkflowHandler) RequestCancelWorkflowExecution(ctx context.Context, cancelRequest *gen.RequestCancelWorkflowExecutionRequest) error
- func (wh *WorkflowHandler) RespondActivityTaskCanceled(ctx context.Context, cancelRequest *gen.RespondActivityTaskCanceledRequest) error
- func (wh *WorkflowHandler) RespondActivityTaskCanceledByID(ctx context.Context, cancelRequest *gen.RespondActivityTaskCanceledByIDRequest) error
- func (wh *WorkflowHandler) RespondActivityTaskCompleted(ctx context.Context, completeRequest *gen.RespondActivityTaskCompletedRequest) error
- func (wh *WorkflowHandler) RespondActivityTaskCompletedByID(ctx context.Context, ...) error
- func (wh *WorkflowHandler) RespondActivityTaskFailed(ctx context.Context, failedRequest *gen.RespondActivityTaskFailedRequest) error
- func (wh *WorkflowHandler) RespondActivityTaskFailedByID(ctx context.Context, failedRequest *gen.RespondActivityTaskFailedByIDRequest) error
- func (wh *WorkflowHandler) RespondDecisionTaskCompleted(ctx context.Context, completeRequest *gen.RespondDecisionTaskCompletedRequest) error
- func (wh *WorkflowHandler) RespondDecisionTaskFailed(ctx context.Context, failedRequest *gen.RespondDecisionTaskFailedRequest) error
- func (wh *WorkflowHandler) RespondQueryTaskCompleted(ctx context.Context, completeRequest *gen.RespondQueryTaskCompletedRequest) error
- func (wh *WorkflowHandler) SignalWithStartWorkflowExecution(ctx context.Context, ...) (*gen.StartWorkflowExecutionResponse, error)
- func (wh *WorkflowHandler) SignalWorkflowExecution(ctx context.Context, signalRequest *gen.SignalWorkflowExecutionRequest) error
- func (wh *WorkflowHandler) Start() error
- func (wh *WorkflowHandler) StartWorkflowExecution(ctx context.Context, startRequest *gen.StartWorkflowExecutionRequest) (*gen.StartWorkflowExecutionResponse, error)
- func (wh *WorkflowHandler) Stop()
- func (wh *WorkflowHandler) TerminateWorkflowExecution(ctx context.Context, terminateRequest *gen.TerminateWorkflowExecutionRequest) error
- func (wh *WorkflowHandler) UpdateDomain(ctx context.Context, updateRequest *gen.UpdateDomainRequest) (*gen.UpdateDomainResponse, error)
Constants ¶
This section is empty.
Variables ¶
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 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
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
type WorkflowHandler ¶
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
func (wh *WorkflowHandler) DescribeTaskList(ctx context.Context, request *gen.DescribeTaskListRequest) (*gen.DescribeTaskListResponse, error)
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
func (wh *WorkflowHandler) DescribeWorkflowExecution(ctx context.Context, request *gen.DescribeWorkflowExecutionRequest) (*gen.DescribeWorkflowExecutionResponse, error)
DescribeWorkflowExecution returns information about the specified workflow execution.
func (*WorkflowHandler) GetWorkflowExecutionHistory ¶
func (wh *WorkflowHandler) GetWorkflowExecutionHistory( ctx context.Context, getRequest *gen.GetWorkflowExecutionHistoryRequest) (*gen.GetWorkflowExecutionHistoryResponse, error)
GetWorkflowExecutionHistory - retrieves the history of workflow execution
func (*WorkflowHandler) Health ¶ added in v0.3.0
func (wh *WorkflowHandler) Health(ctx context.Context) (*health.HealthStatus, error)
Health is for health check
func (*WorkflowHandler) ListClosedWorkflowExecutions ¶
func (wh *WorkflowHandler) ListClosedWorkflowExecutions(ctx context.Context, listRequest *gen.ListClosedWorkflowExecutionsRequest) (*gen.ListClosedWorkflowExecutionsResponse, error)
ListClosedWorkflowExecutions - retrieves info for closed workflow executions in a domain
func (*WorkflowHandler) ListOpenWorkflowExecutions ¶
func (wh *WorkflowHandler) ListOpenWorkflowExecutions(ctx context.Context, listRequest *gen.ListOpenWorkflowExecutionsRequest) (*gen.ListOpenWorkflowExecutionsResponse, error)
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) 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) 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) StartWorkflowExecution ¶
func (wh *WorkflowHandler) StartWorkflowExecution( ctx context.Context, startRequest *gen.StartWorkflowExecutionRequest) (*gen.StartWorkflowExecutionResponse, error)
StartWorkflowExecution - Creates a new workflow execution
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.