frontend

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 62 Imported by: 0

Documentation

Overview

Package frontend is a generated GoMock package.

Index

Constants

View Source
const (
	// DCRedirectionPolicyDefault means no redirection
	DCRedirectionPolicyDefault = ""
	// DCRedirectionPolicyNoop means no redirection
	DCRedirectionPolicyNoop = "noop"
	// DCRedirectionPolicySelectedAPIsForwarding means forwarding the following APIs based namespace
	// 1. StartWorkflowExecution
	// 2. SignalWithStartWorkflowExecution
	// 3. SignalWorkflowExecution
	// 4. RequestCancelWorkflowExecution
	// 5. TerminateWorkflowExecution
	// 6. QueryWorkflow
	// please also reference selectedAPIsForwardingRedirectionPolicyWhitelistedAPIs
	DCRedirectionPolicySelectedAPIsForwarding = "selected-apis-forwarding"
)
View Source
const VersionCheckInterval = 24 * time.Hour

Variables

This section is empty.

Functions

func NewService

func NewService(
	params *resource.BootstrapParams,
) (resource.Resource, error)

NewService builds a new frontend service

Types

type AdminHandler added in v0.3.12

type AdminHandler struct {
	resource.Resource
	// contains filtered or unexported fields
}

AdminHandler - gRPC handler interface for adminservice

func NewAdminHandler added in v0.3.12

func NewAdminHandler(
	resource resource.Resource,
	params *resource.BootstrapParams,
	config *Config,
) *AdminHandler

NewAdminHandler creates a gRPC handler for the workflowservice

func (*AdminHandler) AddSearchAttribute added in v0.6.0

func (adh *AdminHandler) AddSearchAttribute(ctx context.Context, request *adminservice.AddSearchAttributeRequest) (_ *adminservice.AddSearchAttributeResponse, retError error)

AddSearchAttribute add search attribute to whitelist

func (*AdminHandler) CloseShard added in v0.27.0

func (adh *AdminHandler) CloseShard(ctx context.Context, request *adminservice.CloseShardRequest) (_ *adminservice.CloseShardResponse, retError error)

CloseShard returns information about the internal states of a history host

func (*AdminHandler) DescribeCluster added in v0.27.0

func (adh *AdminHandler) DescribeCluster(ctx context.Context, _ *adminservice.DescribeClusterRequest) (_ *adminservice.DescribeClusterResponse, retError error)

DescribeCluster return information about temporal deployment

func (*AdminHandler) DescribeHistoryHost added in v0.3.13

func (adh *AdminHandler) DescribeHistoryHost(ctx context.Context, request *adminservice.DescribeHistoryHostRequest) (_ *adminservice.DescribeHistoryHostResponse, retError error)

DescribeHistoryHost returns information about the internal states of a history host

func (*AdminHandler) DescribeMutableState added in v1.3.0

func (adh *AdminHandler) DescribeMutableState(ctx context.Context, request *adminservice.DescribeMutableStateRequest) (_ *adminservice.DescribeMutableStateResponse, retError error)

DescribeMutableState returns information about the specified workflow execution.

func (*AdminHandler) GetDLQMessages added in v0.27.0

func (adh *AdminHandler) GetDLQMessages(
	ctx context.Context,
	request *adminservice.GetDLQMessagesRequest,
) (resp *adminservice.GetDLQMessagesResponse, retErr error)

GetDLQMessages reads messages from DLQ

func (*AdminHandler) GetDLQReplicationMessages added in v0.27.0

func (adh *AdminHandler) GetDLQReplicationMessages(ctx context.Context, request *adminservice.GetDLQReplicationMessagesRequest) (_ *adminservice.GetDLQReplicationMessagesResponse, retError error)

GetDLQReplicationMessages returns new replication tasks based on the dlq info.

func (*AdminHandler) GetNamespaceReplicationMessages added in v0.27.0

func (adh *AdminHandler) GetNamespaceReplicationMessages(ctx context.Context, request *adminservice.GetNamespaceReplicationMessagesRequest) (_ *adminservice.GetNamespaceReplicationMessagesResponse, retError error)

GetNamespaceReplicationMessages returns new namespace replication tasks since last retrieved task ID.

func (*AdminHandler) GetReplicationMessages added in v0.27.0

func (adh *AdminHandler) GetReplicationMessages(ctx context.Context, request *adminservice.GetReplicationMessagesRequest) (_ *adminservice.GetReplicationMessagesResponse, retError error)

GetReplicationMessages returns new replication tasks since the read level provided in the token.

func (*AdminHandler) GetWorkflowExecutionRawHistoryV2 added in v0.27.0

func (adh *AdminHandler) GetWorkflowExecutionRawHistoryV2(ctx context.Context, request *adminservice.GetWorkflowExecutionRawHistoryV2Request) (_ *adminservice.GetWorkflowExecutionRawHistoryV2Response, retError error)

GetWorkflowExecutionRawHistoryV2 - retrieves the history of workflow execution

func (*AdminHandler) MergeDLQMessages added in v0.27.0

func (adh *AdminHandler) MergeDLQMessages(
	ctx context.Context,
	request *adminservice.MergeDLQMessagesRequest,
) (resp *adminservice.MergeDLQMessagesResponse, err error)

MergeDLQMessages merges DLQ messages

func (*AdminHandler) PurgeDLQMessages added in v0.27.0

func (adh *AdminHandler) PurgeDLQMessages(
	ctx context.Context,
	request *adminservice.PurgeDLQMessagesRequest,
) (_ *adminservice.PurgeDLQMessagesResponse, err error)

PurgeDLQMessages purge messages from DLQ

func (*AdminHandler) ReapplyEvents added in v0.27.0

func (adh *AdminHandler) ReapplyEvents(ctx context.Context, request *adminservice.ReapplyEventsRequest) (_ *adminservice.ReapplyEventsResponse, retError error)

ReapplyEvents applies stale events to the current workflow and the current run

func (*AdminHandler) RefreshWorkflowTasks added in v0.27.0

func (adh *AdminHandler) RefreshWorkflowTasks(
	ctx context.Context,
	request *adminservice.RefreshWorkflowTasksRequest,
) (_ *adminservice.RefreshWorkflowTasksResponse, err error)

RefreshWorkflowTasks re-generates the workflow tasks

func (*AdminHandler) RemoveTask added in v0.27.0

func (adh *AdminHandler) RemoveTask(ctx context.Context, request *adminservice.RemoveTaskRequest) (_ *adminservice.RemoveTaskResponse, retError error)

RemoveTask returns information about the internal states of a history host

func (*AdminHandler) ResendReplicationTasks added in v0.27.0

func (adh *AdminHandler) ResendReplicationTasks(
	ctx context.Context,
	request *adminservice.ResendReplicationTasksRequest,
) (_ *adminservice.ResendReplicationTasksResponse, err error)

ResendReplicationTasks requests replication task from remote cluster

func (*AdminHandler) Start added in v0.3.12

func (adh *AdminHandler) Start()

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 {
	NumHistoryShards           int32
	PersistenceMaxQPS          dynamicconfig.IntPropertyFn
	PersistenceGlobalMaxQPS    dynamicconfig.IntPropertyFn
	VisibilityMaxPageSize      dynamicconfig.IntPropertyFnWithNamespaceFilter
	EnableVisibilitySampling   dynamicconfig.BoolPropertyFn
	VisibilityListMaxQPS       dynamicconfig.IntPropertyFnWithNamespaceFilter
	EnableReadVisibilityFromES dynamicconfig.BoolPropertyFnWithNamespaceFilter
	ESVisibilityListMaxQPS     dynamicconfig.IntPropertyFnWithNamespaceFilter
	ESIndexMaxResultWindow     dynamicconfig.IntPropertyFn
	HistoryMaxPageSize         dynamicconfig.IntPropertyFnWithNamespaceFilter
	RPS                        dynamicconfig.IntPropertyFn
	MaxNamespaceRPSPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
	GlobalNamespaceRPS         dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxIDLengthLimit           dynamicconfig.IntPropertyFn
	EnableClientVersionCheck   dynamicconfig.BoolPropertyFn
	MinRetentionDays           dynamicconfig.IntPropertyFn
	DisallowQuery              dynamicconfig.BoolPropertyFnWithNamespaceFilter
	ShutdownDrainDuration      dynamicconfig.DurationPropertyFn

	// Persistence settings
	HistoryMgrNumConns dynamicconfig.IntPropertyFn

	MaxBadBinaries dynamicconfig.IntPropertyFnWithNamespaceFilter

	// security protection settings
	EnableAdminProtection         dynamicconfig.BoolPropertyFn
	AdminOperationToken           dynamicconfig.StringPropertyFn
	DisableListVisibilityByFilter dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// size limit system protection
	BlobSizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter
	BlobSizeLimitWarn  dynamicconfig.IntPropertyFnWithNamespaceFilter

	ThrottledLogRPS dynamicconfig.IntPropertyFn

	// Namespace specific config
	EnableNamespaceNotActiveAutoForwarding dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// ValidSearchAttributes is legal indexed keys that can be used in list APIs
	ValidSearchAttributes             dynamicconfig.MapPropertyFn
	SearchAttributesNumberOfKeysLimit dynamicconfig.IntPropertyFnWithNamespaceFilter
	SearchAttributesSizeOfValueLimit  dynamicconfig.IntPropertyFnWithNamespaceFilter
	SearchAttributesTotalSizeLimit    dynamicconfig.IntPropertyFnWithNamespaceFilter

	// DefaultWorkflowRetryPolicy represents default values for unset fields on a Workflow's
	// specified RetryPolicy
	DefaultWorkflowRetryPolicy dynamicconfig.MapPropertyFnWithNamespaceFilter

	// VisibilityArchival system protection
	VisibilityArchivalQueryMaxPageSize dynamicconfig.IntPropertyFn

	SendRawWorkflowHistory dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// DefaultWorkflowTaskTimeout the default workflow task timeout
	DefaultWorkflowTaskTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter

	// EnableServerVersionCheck disables periodic version checking performed by the frontend
	EnableServerVersionCheck dynamicconfig.BoolPropertyFn

	// EnableTokenNamespaceEnforcement enables enforcement that namespace in completion token matches namespace of the request
	EnableTokenNamespaceEnforcement dynamicconfig.BoolPropertyFn
}

Config represents configuration for frontend service

func NewConfig added in v0.3.0

func NewConfig(dc *dynamicconfig.Collection, numHistoryShards int32, enableReadFromES bool) *Config

NewConfig returns new service config with default values

type DCRedirectionHandlerImpl added in v0.5.2

type DCRedirectionHandlerImpl struct {
	resource.Resource
	// contains filtered or unexported fields
}

DCRedirectionHandlerImpl is simple wrapper over frontend service, doing redirection based on policy

func NewDCRedirectionHandler added in v0.5.2

func NewDCRedirectionHandler(
	wfHandler Handler,
	policy config.DCRedirectionPolicy,
) *DCRedirectionHandlerImpl

NewDCRedirectionHandler creates a thrift handler for the temporal service, frontend

func (*DCRedirectionHandlerImpl) Check added in v0.27.0

Check is for health check

func (*DCRedirectionHandlerImpl) CountWorkflowExecutions added in v0.5.8

func (handler *DCRedirectionHandlerImpl) CountWorkflowExecutions(
	ctx context.Context,
	request *workflowservice.CountWorkflowExecutionsRequest,
) (resp *workflowservice.CountWorkflowExecutionsResponse, retError error)

CountWorkflowExecutions API call

func (*DCRedirectionHandlerImpl) DeprecateNamespace added in v0.27.0

func (handler *DCRedirectionHandlerImpl) DeprecateNamespace(
	ctx context.Context,
	request *workflowservice.DeprecateNamespaceRequest,
) (resp *workflowservice.DeprecateNamespaceResponse, retError error)

DeprecateNamespace API call

func (*DCRedirectionHandlerImpl) DescribeNamespace added in v0.27.0

func (handler *DCRedirectionHandlerImpl) DescribeNamespace(
	ctx context.Context,
	request *workflowservice.DescribeNamespaceRequest,
) (resp *workflowservice.DescribeNamespaceResponse, retError error)

DescribeNamespace API call

func (*DCRedirectionHandlerImpl) DescribeTaskQueue added in v0.27.0

func (handler *DCRedirectionHandlerImpl) DescribeTaskQueue(
	ctx context.Context,
	request *workflowservice.DescribeTaskQueueRequest,
) (resp *workflowservice.DescribeTaskQueueResponse, retError error)

DescribeTaskQueue API call

func (*DCRedirectionHandlerImpl) DescribeWorkflowExecution added in v0.5.2

func (handler *DCRedirectionHandlerImpl) DescribeWorkflowExecution(
	ctx context.Context,
	request *workflowservice.DescribeWorkflowExecutionRequest,
) (resp *workflowservice.DescribeWorkflowExecutionResponse, retError error)

DescribeWorkflowExecution API call

func (*DCRedirectionHandlerImpl) GetClusterInfo added in v0.27.0

func (handler *DCRedirectionHandlerImpl) GetClusterInfo(
	ctx context.Context,
	request *workflowservice.GetClusterInfoRequest,
) (*workflowservice.GetClusterInfoResponse, error)

GetClusterInfo API call

func (*DCRedirectionHandlerImpl) GetConfig added in v0.27.0

func (handler *DCRedirectionHandlerImpl) GetConfig() *Config

GetConfig return config

func (*DCRedirectionHandlerImpl) GetResource added in v0.27.0

func (handler *DCRedirectionHandlerImpl) GetResource() resource.Resource

GetResource return resource

func (*DCRedirectionHandlerImpl) GetSearchAttributes added in v0.5.9

func (handler *DCRedirectionHandlerImpl) GetSearchAttributes(
	ctx context.Context,
	request *workflowservice.GetSearchAttributesRequest,
) (resp *workflowservice.GetSearchAttributesResponse, retError error)

GetSearchAttributes API call

func (*DCRedirectionHandlerImpl) GetWorkflowExecutionHistory added in v0.5.2

func (handler *DCRedirectionHandlerImpl) GetWorkflowExecutionHistory(
	ctx context.Context,
	request *workflowservice.GetWorkflowExecutionHistoryRequest,
) (resp *workflowservice.GetWorkflowExecutionHistoryResponse, retError error)

GetWorkflowExecutionHistory API call

func (*DCRedirectionHandlerImpl) ListArchivedWorkflowExecutions added in v0.27.0

func (handler *DCRedirectionHandlerImpl) ListArchivedWorkflowExecutions(
	ctx context.Context,
	request *workflowservice.ListArchivedWorkflowExecutionsRequest,
) (resp *workflowservice.ListArchivedWorkflowExecutionsResponse, retError error)

ListArchivedWorkflowExecutions API call

func (*DCRedirectionHandlerImpl) ListClosedWorkflowExecutions added in v0.5.2

func (handler *DCRedirectionHandlerImpl) ListClosedWorkflowExecutions(
	ctx context.Context,
	request *workflowservice.ListClosedWorkflowExecutionsRequest,
) (resp *workflowservice.ListClosedWorkflowExecutionsResponse, retError error)

ListClosedWorkflowExecutions API call

func (*DCRedirectionHandlerImpl) ListNamespaces added in v0.27.0

func (handler *DCRedirectionHandlerImpl) ListNamespaces(
	ctx context.Context,
	request *workflowservice.ListNamespacesRequest,
) (resp *workflowservice.ListNamespacesResponse, retError error)

ListNamespaces API call

func (*DCRedirectionHandlerImpl) ListOpenWorkflowExecutions added in v0.5.2

func (handler *DCRedirectionHandlerImpl) ListOpenWorkflowExecutions(
	ctx context.Context,
	request *workflowservice.ListOpenWorkflowExecutionsRequest,
) (resp *workflowservice.ListOpenWorkflowExecutionsResponse, retError error)

ListOpenWorkflowExecutions API call

func (*DCRedirectionHandlerImpl) ListTaskQueuePartitions added in v0.27.0

func (handler *DCRedirectionHandlerImpl) ListTaskQueuePartitions(
	ctx context.Context,
	request *workflowservice.ListTaskQueuePartitionsRequest,
) (resp *workflowservice.ListTaskQueuePartitionsResponse, retError error)

ListTaskQueuePartitions API call

func (*DCRedirectionHandlerImpl) ListWorkflowExecutions added in v0.5.7

func (handler *DCRedirectionHandlerImpl) ListWorkflowExecutions(
	ctx context.Context,
	request *workflowservice.ListWorkflowExecutionsRequest,
) (resp *workflowservice.ListWorkflowExecutionsResponse, retError error)

ListWorkflowExecutions API call

func (*DCRedirectionHandlerImpl) PollActivityTaskQueue added in v0.27.0

func (handler *DCRedirectionHandlerImpl) PollActivityTaskQueue(
	ctx context.Context,
	request *workflowservice.PollActivityTaskQueueRequest,
) (resp *workflowservice.PollActivityTaskQueueResponse, retError error)

PollActivityTaskQueue API call

func (*DCRedirectionHandlerImpl) PollWorkflowTaskQueue added in v0.27.0

func (handler *DCRedirectionHandlerImpl) PollWorkflowTaskQueue(
	ctx context.Context,
	request *workflowservice.PollWorkflowTaskQueueRequest,
) (resp *workflowservice.PollWorkflowTaskQueueResponse, retError error)

PollWorkflowTaskQueue API call

func (*DCRedirectionHandlerImpl) QueryWorkflow added in v0.5.2

func (handler *DCRedirectionHandlerImpl) QueryWorkflow(
	ctx context.Context,
	request *workflowservice.QueryWorkflowRequest,
) (resp *workflowservice.QueryWorkflowResponse, retError error)

QueryWorkflow API call

func (*DCRedirectionHandlerImpl) RecordActivityTaskHeartbeat added in v0.5.2

func (handler *DCRedirectionHandlerImpl) RecordActivityTaskHeartbeat(
	ctx context.Context,
	request *workflowservice.RecordActivityTaskHeartbeatRequest,
) (resp *workflowservice.RecordActivityTaskHeartbeatResponse, retError error)

RecordActivityTaskHeartbeat API call

func (*DCRedirectionHandlerImpl) RecordActivityTaskHeartbeatById added in v0.27.0

func (handler *DCRedirectionHandlerImpl) RecordActivityTaskHeartbeatById(
	ctx context.Context,
	request *workflowservice.RecordActivityTaskHeartbeatByIdRequest,
) (resp *workflowservice.RecordActivityTaskHeartbeatByIdResponse, retError error)

RecordActivityTaskHeartbeatById API call

func (*DCRedirectionHandlerImpl) RegisterNamespace added in v0.27.0

func (handler *DCRedirectionHandlerImpl) RegisterNamespace(
	ctx context.Context,
	request *workflowservice.RegisterNamespaceRequest,
) (resp *workflowservice.RegisterNamespaceResponse, retError error)

RegisterNamespace API call

func (*DCRedirectionHandlerImpl) RequestCancelWorkflowExecution added in v0.5.2

func (handler *DCRedirectionHandlerImpl) RequestCancelWorkflowExecution(
	ctx context.Context,
	request *workflowservice.RequestCancelWorkflowExecutionRequest,
) (resp *workflowservice.RequestCancelWorkflowExecutionResponse, retError error)

RequestCancelWorkflowExecution API call

func (*DCRedirectionHandlerImpl) ResetStickyTaskQueue added in v0.27.0

func (handler *DCRedirectionHandlerImpl) ResetStickyTaskQueue(
	ctx context.Context,
	request *workflowservice.ResetStickyTaskQueueRequest,
) (resp *workflowservice.ResetStickyTaskQueueResponse, retError error)

ResetStickyTaskQueue API call

func (*DCRedirectionHandlerImpl) ResetWorkflowExecution added in v0.5.2

func (handler *DCRedirectionHandlerImpl) ResetWorkflowExecution(
	ctx context.Context,
	request *workflowservice.ResetWorkflowExecutionRequest,
) (resp *workflowservice.ResetWorkflowExecutionResponse, retError error)

ResetWorkflowExecution API call

func (*DCRedirectionHandlerImpl) RespondActivityTaskCanceled added in v0.5.2

func (handler *DCRedirectionHandlerImpl) RespondActivityTaskCanceled(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskCanceledRequest,
) (resp *workflowservice.RespondActivityTaskCanceledResponse, retError error)

RespondActivityTaskCanceled API call

func (*DCRedirectionHandlerImpl) RespondActivityTaskCanceledById added in v0.27.0

func (handler *DCRedirectionHandlerImpl) RespondActivityTaskCanceledById(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskCanceledByIdRequest,
) (resp *workflowservice.RespondActivityTaskCanceledByIdResponse, retError error)

RespondActivityTaskCanceledById API call

func (*DCRedirectionHandlerImpl) RespondActivityTaskCompleted added in v0.5.2

func (handler *DCRedirectionHandlerImpl) RespondActivityTaskCompleted(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskCompletedRequest,
) (resp *workflowservice.RespondActivityTaskCompletedResponse, retError error)

RespondActivityTaskCompleted API call

func (*DCRedirectionHandlerImpl) RespondActivityTaskCompletedById added in v0.27.0

func (handler *DCRedirectionHandlerImpl) RespondActivityTaskCompletedById(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskCompletedByIdRequest,
) (resp *workflowservice.RespondActivityTaskCompletedByIdResponse, retError error)

RespondActivityTaskCompletedById API call

func (*DCRedirectionHandlerImpl) RespondActivityTaskFailed added in v0.5.2

func (handler *DCRedirectionHandlerImpl) RespondActivityTaskFailed(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskFailedRequest,
) (resp *workflowservice.RespondActivityTaskFailedResponse, retError error)

RespondActivityTaskFailed API call

func (*DCRedirectionHandlerImpl) RespondActivityTaskFailedById added in v0.27.0

func (handler *DCRedirectionHandlerImpl) RespondActivityTaskFailedById(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskFailedByIdRequest,
) (resp *workflowservice.RespondActivityTaskFailedByIdResponse, retError error)

RespondActivityTaskFailedById API call

func (*DCRedirectionHandlerImpl) RespondQueryTaskCompleted added in v0.5.2

func (handler *DCRedirectionHandlerImpl) RespondQueryTaskCompleted(
	ctx context.Context,
	request *workflowservice.RespondQueryTaskCompletedRequest,
) (resp *workflowservice.RespondQueryTaskCompletedResponse, retError error)

RespondQueryTaskCompleted API call

func (*DCRedirectionHandlerImpl) RespondWorkflowTaskCompleted added in v0.27.0

func (handler *DCRedirectionHandlerImpl) RespondWorkflowTaskCompleted(
	ctx context.Context,
	request *workflowservice.RespondWorkflowTaskCompletedRequest,
) (resp *workflowservice.RespondWorkflowTaskCompletedResponse, retError error)

RespondWorkflowTaskCompleted API call

func (*DCRedirectionHandlerImpl) RespondWorkflowTaskFailed added in v0.27.0

func (handler *DCRedirectionHandlerImpl) RespondWorkflowTaskFailed(
	ctx context.Context,
	request *workflowservice.RespondWorkflowTaskFailedRequest,
) (resp *workflowservice.RespondWorkflowTaskFailedResponse, retError error)

RespondWorkflowTaskFailed API call

func (*DCRedirectionHandlerImpl) ScanWorkflowExecutions added in v0.5.8

func (handler *DCRedirectionHandlerImpl) ScanWorkflowExecutions(
	ctx context.Context,
	request *workflowservice.ScanWorkflowExecutionsRequest,
) (resp *workflowservice.ScanWorkflowExecutionsResponse, retError error)

ScanWorkflowExecutions API call

func (*DCRedirectionHandlerImpl) SignalWithStartWorkflowExecution added in v0.5.2

func (handler *DCRedirectionHandlerImpl) SignalWithStartWorkflowExecution(
	ctx context.Context,
	request *workflowservice.SignalWithStartWorkflowExecutionRequest,
) (resp *workflowservice.SignalWithStartWorkflowExecutionResponse, retError error)

SignalWithStartWorkflowExecution API call

func (*DCRedirectionHandlerImpl) SignalWorkflowExecution added in v0.5.2

func (handler *DCRedirectionHandlerImpl) SignalWorkflowExecution(
	ctx context.Context,
	request *workflowservice.SignalWorkflowExecutionRequest,
) (resp *workflowservice.SignalWorkflowExecutionResponse, retError error)

SignalWorkflowExecution API call

func (*DCRedirectionHandlerImpl) Start added in v0.5.2

func (handler *DCRedirectionHandlerImpl) Start()

Start starts the handler

func (*DCRedirectionHandlerImpl) StartWorkflowExecution added in v0.5.2

func (handler *DCRedirectionHandlerImpl) StartWorkflowExecution(
	ctx context.Context,
	request *workflowservice.StartWorkflowExecutionRequest,
) (resp *workflowservice.StartWorkflowExecutionResponse, retError error)

StartWorkflowExecution API call

func (*DCRedirectionHandlerImpl) Stop added in v0.5.2

func (handler *DCRedirectionHandlerImpl) Stop()

Stop stops the handler

func (*DCRedirectionHandlerImpl) TerminateWorkflowExecution added in v0.5.2

func (handler *DCRedirectionHandlerImpl) TerminateWorkflowExecution(
	ctx context.Context,
	request *workflowservice.TerminateWorkflowExecutionRequest,
) (resp *workflowservice.TerminateWorkflowExecutionResponse, retError error)

TerminateWorkflowExecution API call

func (*DCRedirectionHandlerImpl) UpdateHealthStatus added in v0.27.0

func (handler *DCRedirectionHandlerImpl) UpdateHealthStatus(status HealthStatus)

UpdateHealthStatus sets the health status for this rpc handler. This health status will be used within the rpc health check handler

func (*DCRedirectionHandlerImpl) UpdateNamespace added in v0.27.0

func (handler *DCRedirectionHandlerImpl) UpdateNamespace(
	ctx context.Context,
	request *workflowservice.UpdateNamespaceRequest,
) (resp *workflowservice.UpdateNamespaceResponse, retError error)

UpdateNamespace API call

func (*DCRedirectionHandlerImpl) Watch added in v0.27.0

type DCRedirectionPolicy added in v0.5.2

type DCRedirectionPolicy interface {
	WithNamespaceIDRedirect(ctx context.Context, namespaceID string, apiName string, call func(string) error) error
	WithNamespaceRedirect(ctx context.Context, namespace string, apiName string, call func(string) error) error
}

DCRedirectionPolicy is a DC redirection policy interface

func RedirectionPolicyGenerator added in v0.5.2

func RedirectionPolicyGenerator(clusterMetadata cluster.Metadata, config *Config,
	namespaceCache cache.NamespaceCache, policy config.DCRedirectionPolicy) DCRedirectionPolicy

RedirectionPolicyGenerator generate corresponding redirection policy

type Handler added in v0.27.0

type Handler interface {
	workflowservice.WorkflowServiceServer
	common.Daemon

	// Health is the health check method for this rpc handler
	healthpb.HealthServer
	// UpdateHealthStatus sets the health status for this rpc handler.
	// This health status will be used within the rpc health check handler
	UpdateHealthStatus(status HealthStatus)

	GetResource() resource.Resource
	GetConfig() *Config
}

Handler is interface wrapping frontend handler

func NewWorkflowHandler

func NewWorkflowHandler(
	resource resource.Resource,
	config *Config,
	replicationMessageSink messaging.Producer,
) Handler

NewWorkflowHandler creates a gRPC handler for workflowservice

type HealthStatus added in v0.27.0

type HealthStatus int32

HealthStatus is an enum that refers to the rpc handler health status

const (
	// HealthStatusOK is used when this node is healthy and rpc requests are allowed
	HealthStatusOK HealthStatus = iota + 1
	// HealthStatusShuttingDown is used when the rpc handler is shutting down
	HealthStatusShuttingDown
)

func (HealthStatus) String added in v0.27.0

func (hs HealthStatus) String() string

type MockDCRedirectionPolicy added in v0.5.9

type MockDCRedirectionPolicy struct {
	mock.Mock
}

MockDCRedirectionPolicy is an autogenerated mock type for the DCRedirectionPolicy type

func (*MockDCRedirectionPolicy) WithNamespaceIDRedirect added in v0.27.0

func (_m *MockDCRedirectionPolicy) WithNamespaceIDRedirect(ctx context.Context, namespaceID string, apiName string, call func(string) error) error

WithNamespaceIDRedirect provides a mock function with given fields: namespaceID, apiName, call

func (*MockDCRedirectionPolicy) WithNamespaceRedirect added in v0.27.0

func (_m *MockDCRedirectionPolicy) WithNamespaceRedirect(ctx context.Context, namespace string, apiName string, call func(string) error) error

WithNamespaceRedirect provides a mock function with given fields: namespace, apiName, call

type MockHandler added in v0.27.0

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

MockHandler is a mock of Handler interface.

func NewMockHandler added in v0.27.0

func NewMockHandler(ctrl *gomock.Controller) *MockHandler

NewMockHandler creates a new mock instance.

func (*MockHandler) Check added in v0.27.0

Check mocks base method.

func (*MockHandler) CountWorkflowExecutions added in v0.27.0

CountWorkflowExecutions mocks base method.

func (*MockHandler) DeprecateNamespace added in v0.27.0

DeprecateNamespace mocks base method.

func (*MockHandler) DescribeNamespace added in v0.27.0

DescribeNamespace mocks base method.

func (*MockHandler) DescribeTaskQueue added in v0.27.0

DescribeTaskQueue mocks base method.

func (*MockHandler) DescribeWorkflowExecution added in v0.27.0

DescribeWorkflowExecution mocks base method.

func (*MockHandler) EXPECT added in v0.27.0

func (m *MockHandler) EXPECT() *MockHandlerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHandler) GetClusterInfo added in v0.27.0

GetClusterInfo mocks base method.

func (*MockHandler) GetConfig added in v0.27.0

func (m *MockHandler) GetConfig() *Config

GetConfig mocks base method.

func (*MockHandler) GetResource added in v0.27.0

func (m *MockHandler) GetResource() resource.Resource

GetResource mocks base method.

func (*MockHandler) GetSearchAttributes added in v0.27.0

GetSearchAttributes mocks base method.

func (*MockHandler) GetWorkflowExecutionHistory added in v0.27.0

GetWorkflowExecutionHistory mocks base method.

func (*MockHandler) ListArchivedWorkflowExecutions added in v0.27.0

ListArchivedWorkflowExecutions mocks base method.

func (*MockHandler) ListClosedWorkflowExecutions added in v0.27.0

ListClosedWorkflowExecutions mocks base method.

func (*MockHandler) ListNamespaces added in v0.27.0

ListNamespaces mocks base method.

func (*MockHandler) ListOpenWorkflowExecutions added in v0.27.0

ListOpenWorkflowExecutions mocks base method.

func (*MockHandler) ListTaskQueuePartitions added in v0.27.0

ListTaskQueuePartitions mocks base method.

func (*MockHandler) ListWorkflowExecutions added in v0.27.0

ListWorkflowExecutions mocks base method.

func (*MockHandler) PollActivityTaskQueue added in v0.27.0

PollActivityTaskQueue mocks base method.

func (*MockHandler) PollWorkflowTaskQueue added in v0.27.0

PollWorkflowTaskQueue mocks base method.

func (*MockHandler) QueryWorkflow added in v0.27.0

func (m *MockHandler) QueryWorkflow(arg0 context.Context, arg1 *v1.QueryWorkflowRequest) (*v1.QueryWorkflowResponse, error)

QueryWorkflow mocks base method.

func (*MockHandler) RecordActivityTaskHeartbeat added in v0.27.0

RecordActivityTaskHeartbeat mocks base method.

func (*MockHandler) RecordActivityTaskHeartbeatById added in v0.27.0

RecordActivityTaskHeartbeatById mocks base method.

func (*MockHandler) RegisterNamespace added in v0.27.0

RegisterNamespace mocks base method.

func (*MockHandler) RequestCancelWorkflowExecution added in v0.27.0

RequestCancelWorkflowExecution mocks base method.

func (*MockHandler) ResetStickyTaskQueue added in v0.27.0

ResetStickyTaskQueue mocks base method.

func (*MockHandler) ResetWorkflowExecution added in v0.27.0

ResetWorkflowExecution mocks base method.

func (*MockHandler) RespondActivityTaskCanceled added in v0.27.0

RespondActivityTaskCanceled mocks base method.

func (*MockHandler) RespondActivityTaskCanceledById added in v0.27.0

RespondActivityTaskCanceledById mocks base method.

func (*MockHandler) RespondActivityTaskCompleted added in v0.27.0

RespondActivityTaskCompleted mocks base method.

func (*MockHandler) RespondActivityTaskCompletedById added in v0.27.0

RespondActivityTaskCompletedById mocks base method.

func (*MockHandler) RespondActivityTaskFailed added in v0.27.0

RespondActivityTaskFailed mocks base method.

func (*MockHandler) RespondActivityTaskFailedById added in v0.27.0

RespondActivityTaskFailedById mocks base method.

func (*MockHandler) RespondQueryTaskCompleted added in v0.27.0

RespondQueryTaskCompleted mocks base method.

func (*MockHandler) RespondWorkflowTaskCompleted added in v0.27.0

RespondWorkflowTaskCompleted mocks base method.

func (*MockHandler) RespondWorkflowTaskFailed added in v0.27.0

RespondWorkflowTaskFailed mocks base method.

func (*MockHandler) ScanWorkflowExecutions added in v0.27.0

ScanWorkflowExecutions mocks base method.

func (*MockHandler) SignalWithStartWorkflowExecution added in v0.27.0

SignalWithStartWorkflowExecution mocks base method.

func (*MockHandler) SignalWorkflowExecution added in v0.27.0

SignalWorkflowExecution mocks base method.

func (*MockHandler) Start added in v0.27.0

func (m *MockHandler) Start()

Start mocks base method.

func (*MockHandler) StartWorkflowExecution added in v0.27.0

StartWorkflowExecution mocks base method.

func (*MockHandler) Stop added in v0.27.0

func (m *MockHandler) Stop()

Stop mocks base method.

func (*MockHandler) TerminateWorkflowExecution added in v0.27.0

TerminateWorkflowExecution mocks base method.

func (*MockHandler) UpdateHealthStatus added in v0.27.0

func (m *MockHandler) UpdateHealthStatus(status HealthStatus)

UpdateHealthStatus mocks base method.

func (*MockHandler) UpdateNamespace added in v0.27.0

UpdateNamespace mocks base method.

func (*MockHandler) Watch added in v0.27.0

Watch mocks base method.

type MockHandlerMockRecorder added in v0.27.0

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

MockHandlerMockRecorder is the mock recorder for MockHandler.

func (*MockHandlerMockRecorder) Check added in v0.27.0

func (mr *MockHandlerMockRecorder) Check(arg0, arg1 interface{}) *gomock.Call

Check indicates an expected call of Check.

func (*MockHandlerMockRecorder) CountWorkflowExecutions added in v0.27.0

func (mr *MockHandlerMockRecorder) CountWorkflowExecutions(arg0, arg1 interface{}) *gomock.Call

CountWorkflowExecutions indicates an expected call of CountWorkflowExecutions.

func (*MockHandlerMockRecorder) DeprecateNamespace added in v0.27.0

func (mr *MockHandlerMockRecorder) DeprecateNamespace(arg0, arg1 interface{}) *gomock.Call

DeprecateNamespace indicates an expected call of DeprecateNamespace.

func (*MockHandlerMockRecorder) DescribeNamespace added in v0.27.0

func (mr *MockHandlerMockRecorder) DescribeNamespace(arg0, arg1 interface{}) *gomock.Call

DescribeNamespace indicates an expected call of DescribeNamespace.

func (*MockHandlerMockRecorder) DescribeTaskQueue added in v0.27.0

func (mr *MockHandlerMockRecorder) DescribeTaskQueue(arg0, arg1 interface{}) *gomock.Call

DescribeTaskQueue indicates an expected call of DescribeTaskQueue.

func (*MockHandlerMockRecorder) DescribeWorkflowExecution added in v0.27.0

func (mr *MockHandlerMockRecorder) DescribeWorkflowExecution(arg0, arg1 interface{}) *gomock.Call

DescribeWorkflowExecution indicates an expected call of DescribeWorkflowExecution.

func (*MockHandlerMockRecorder) GetClusterInfo added in v0.27.0

func (mr *MockHandlerMockRecorder) GetClusterInfo(arg0, arg1 interface{}) *gomock.Call

GetClusterInfo indicates an expected call of GetClusterInfo.

func (*MockHandlerMockRecorder) GetConfig added in v0.27.0

func (mr *MockHandlerMockRecorder) GetConfig() *gomock.Call

GetConfig indicates an expected call of GetConfig.

func (*MockHandlerMockRecorder) GetResource added in v0.27.0

func (mr *MockHandlerMockRecorder) GetResource() *gomock.Call

GetResource indicates an expected call of GetResource.

func (*MockHandlerMockRecorder) GetSearchAttributes added in v0.27.0

func (mr *MockHandlerMockRecorder) GetSearchAttributes(arg0, arg1 interface{}) *gomock.Call

GetSearchAttributes indicates an expected call of GetSearchAttributes.

func (*MockHandlerMockRecorder) GetWorkflowExecutionHistory added in v0.27.0

func (mr *MockHandlerMockRecorder) GetWorkflowExecutionHistory(arg0, arg1 interface{}) *gomock.Call

GetWorkflowExecutionHistory indicates an expected call of GetWorkflowExecutionHistory.

func (*MockHandlerMockRecorder) ListArchivedWorkflowExecutions added in v0.27.0

func (mr *MockHandlerMockRecorder) ListArchivedWorkflowExecutions(arg0, arg1 interface{}) *gomock.Call

ListArchivedWorkflowExecutions indicates an expected call of ListArchivedWorkflowExecutions.

func (*MockHandlerMockRecorder) ListClosedWorkflowExecutions added in v0.27.0

func (mr *MockHandlerMockRecorder) ListClosedWorkflowExecutions(arg0, arg1 interface{}) *gomock.Call

ListClosedWorkflowExecutions indicates an expected call of ListClosedWorkflowExecutions.

func (*MockHandlerMockRecorder) ListNamespaces added in v0.27.0

func (mr *MockHandlerMockRecorder) ListNamespaces(arg0, arg1 interface{}) *gomock.Call

ListNamespaces indicates an expected call of ListNamespaces.

func (*MockHandlerMockRecorder) ListOpenWorkflowExecutions added in v0.27.0

func (mr *MockHandlerMockRecorder) ListOpenWorkflowExecutions(arg0, arg1 interface{}) *gomock.Call

ListOpenWorkflowExecutions indicates an expected call of ListOpenWorkflowExecutions.

func (*MockHandlerMockRecorder) ListTaskQueuePartitions added in v0.27.0

func (mr *MockHandlerMockRecorder) ListTaskQueuePartitions(arg0, arg1 interface{}) *gomock.Call

ListTaskQueuePartitions indicates an expected call of ListTaskQueuePartitions.

func (*MockHandlerMockRecorder) ListWorkflowExecutions added in v0.27.0

func (mr *MockHandlerMockRecorder) ListWorkflowExecutions(arg0, arg1 interface{}) *gomock.Call

ListWorkflowExecutions indicates an expected call of ListWorkflowExecutions.

func (*MockHandlerMockRecorder) PollActivityTaskQueue added in v0.27.0

func (mr *MockHandlerMockRecorder) PollActivityTaskQueue(arg0, arg1 interface{}) *gomock.Call

PollActivityTaskQueue indicates an expected call of PollActivityTaskQueue.

func (*MockHandlerMockRecorder) PollWorkflowTaskQueue added in v0.27.0

func (mr *MockHandlerMockRecorder) PollWorkflowTaskQueue(arg0, arg1 interface{}) *gomock.Call

PollWorkflowTaskQueue indicates an expected call of PollWorkflowTaskQueue.

func (*MockHandlerMockRecorder) QueryWorkflow added in v0.27.0

func (mr *MockHandlerMockRecorder) QueryWorkflow(arg0, arg1 interface{}) *gomock.Call

QueryWorkflow indicates an expected call of QueryWorkflow.

func (*MockHandlerMockRecorder) RecordActivityTaskHeartbeat added in v0.27.0

func (mr *MockHandlerMockRecorder) RecordActivityTaskHeartbeat(arg0, arg1 interface{}) *gomock.Call

RecordActivityTaskHeartbeat indicates an expected call of RecordActivityTaskHeartbeat.

func (*MockHandlerMockRecorder) RecordActivityTaskHeartbeatById added in v0.27.0

func (mr *MockHandlerMockRecorder) RecordActivityTaskHeartbeatById(arg0, arg1 interface{}) *gomock.Call

RecordActivityTaskHeartbeatById indicates an expected call of RecordActivityTaskHeartbeatById.

func (*MockHandlerMockRecorder) RegisterNamespace added in v0.27.0

func (mr *MockHandlerMockRecorder) RegisterNamespace(arg0, arg1 interface{}) *gomock.Call

RegisterNamespace indicates an expected call of RegisterNamespace.

func (*MockHandlerMockRecorder) RequestCancelWorkflowExecution added in v0.27.0

func (mr *MockHandlerMockRecorder) RequestCancelWorkflowExecution(arg0, arg1 interface{}) *gomock.Call

RequestCancelWorkflowExecution indicates an expected call of RequestCancelWorkflowExecution.

func (*MockHandlerMockRecorder) ResetStickyTaskQueue added in v0.27.0

func (mr *MockHandlerMockRecorder) ResetStickyTaskQueue(arg0, arg1 interface{}) *gomock.Call

ResetStickyTaskQueue indicates an expected call of ResetStickyTaskQueue.

func (*MockHandlerMockRecorder) ResetWorkflowExecution added in v0.27.0

func (mr *MockHandlerMockRecorder) ResetWorkflowExecution(arg0, arg1 interface{}) *gomock.Call

ResetWorkflowExecution indicates an expected call of ResetWorkflowExecution.

func (*MockHandlerMockRecorder) RespondActivityTaskCanceled added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondActivityTaskCanceled(arg0, arg1 interface{}) *gomock.Call

RespondActivityTaskCanceled indicates an expected call of RespondActivityTaskCanceled.

func (*MockHandlerMockRecorder) RespondActivityTaskCanceledById added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondActivityTaskCanceledById(arg0, arg1 interface{}) *gomock.Call

RespondActivityTaskCanceledById indicates an expected call of RespondActivityTaskCanceledById.

func (*MockHandlerMockRecorder) RespondActivityTaskCompleted added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondActivityTaskCompleted(arg0, arg1 interface{}) *gomock.Call

RespondActivityTaskCompleted indicates an expected call of RespondActivityTaskCompleted.

func (*MockHandlerMockRecorder) RespondActivityTaskCompletedById added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondActivityTaskCompletedById(arg0, arg1 interface{}) *gomock.Call

RespondActivityTaskCompletedById indicates an expected call of RespondActivityTaskCompletedById.

func (*MockHandlerMockRecorder) RespondActivityTaskFailed added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondActivityTaskFailed(arg0, arg1 interface{}) *gomock.Call

RespondActivityTaskFailed indicates an expected call of RespondActivityTaskFailed.

func (*MockHandlerMockRecorder) RespondActivityTaskFailedById added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondActivityTaskFailedById(arg0, arg1 interface{}) *gomock.Call

RespondActivityTaskFailedById indicates an expected call of RespondActivityTaskFailedById.

func (*MockHandlerMockRecorder) RespondQueryTaskCompleted added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondQueryTaskCompleted(arg0, arg1 interface{}) *gomock.Call

RespondQueryTaskCompleted indicates an expected call of RespondQueryTaskCompleted.

func (*MockHandlerMockRecorder) RespondWorkflowTaskCompleted added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondWorkflowTaskCompleted(arg0, arg1 interface{}) *gomock.Call

RespondWorkflowTaskCompleted indicates an expected call of RespondWorkflowTaskCompleted.

func (*MockHandlerMockRecorder) RespondWorkflowTaskFailed added in v0.27.0

func (mr *MockHandlerMockRecorder) RespondWorkflowTaskFailed(arg0, arg1 interface{}) *gomock.Call

RespondWorkflowTaskFailed indicates an expected call of RespondWorkflowTaskFailed.

func (*MockHandlerMockRecorder) ScanWorkflowExecutions added in v0.27.0

func (mr *MockHandlerMockRecorder) ScanWorkflowExecutions(arg0, arg1 interface{}) *gomock.Call

ScanWorkflowExecutions indicates an expected call of ScanWorkflowExecutions.

func (*MockHandlerMockRecorder) SignalWithStartWorkflowExecution added in v0.27.0

func (mr *MockHandlerMockRecorder) SignalWithStartWorkflowExecution(arg0, arg1 interface{}) *gomock.Call

SignalWithStartWorkflowExecution indicates an expected call of SignalWithStartWorkflowExecution.

func (*MockHandlerMockRecorder) SignalWorkflowExecution added in v0.27.0

func (mr *MockHandlerMockRecorder) SignalWorkflowExecution(arg0, arg1 interface{}) *gomock.Call

SignalWorkflowExecution indicates an expected call of SignalWorkflowExecution.

func (*MockHandlerMockRecorder) Start added in v0.27.0

func (mr *MockHandlerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockHandlerMockRecorder) StartWorkflowExecution added in v0.27.0

func (mr *MockHandlerMockRecorder) StartWorkflowExecution(arg0, arg1 interface{}) *gomock.Call

StartWorkflowExecution indicates an expected call of StartWorkflowExecution.

func (*MockHandlerMockRecorder) Stop added in v0.27.0

func (mr *MockHandlerMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop.

func (*MockHandlerMockRecorder) TerminateWorkflowExecution added in v0.27.0

func (mr *MockHandlerMockRecorder) TerminateWorkflowExecution(arg0, arg1 interface{}) *gomock.Call

TerminateWorkflowExecution indicates an expected call of TerminateWorkflowExecution.

func (*MockHandlerMockRecorder) UpdateHealthStatus added in v0.27.0

func (mr *MockHandlerMockRecorder) UpdateHealthStatus(status interface{}) *gomock.Call

UpdateHealthStatus indicates an expected call of UpdateHealthStatus.

func (*MockHandlerMockRecorder) UpdateNamespace added in v0.27.0

func (mr *MockHandlerMockRecorder) UpdateNamespace(arg0, arg1 interface{}) *gomock.Call

UpdateNamespace indicates an expected call of UpdateNamespace.

func (*MockHandlerMockRecorder) Watch added in v0.27.0

func (mr *MockHandlerMockRecorder) Watch(arg0, arg1 interface{}) *gomock.Call

Watch indicates an expected call of Watch.

type NoopRedirectionPolicy added in v0.5.2

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

NoopRedirectionPolicy is DC redirection policy which does nothing

func NewNoopRedirectionPolicy added in v0.5.2

func NewNoopRedirectionPolicy(currentClusterName string) *NoopRedirectionPolicy

NewNoopRedirectionPolicy is DC redirection policy which does nothing

func (*NoopRedirectionPolicy) WithNamespaceIDRedirect added in v0.27.0

func (policy *NoopRedirectionPolicy) WithNamespaceIDRedirect(ctx context.Context, namespaceID string, apiName string, call func(string) error) error

WithNamespaceIDRedirect redirect the API call based on namespace ID

func (*NoopRedirectionPolicy) WithNamespaceRedirect added in v0.27.0

func (policy *NoopRedirectionPolicy) WithNamespaceRedirect(ctx context.Context, namespace string, apiName string, call func(string) error) error

WithNamespaceRedirect redirect the API call based on namespace name

type SelectedAPIsForwardingRedirectionPolicy added in v0.5.9

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

SelectedAPIsForwardingRedirectionPolicy is a DC redirection policy which (based on namespace) forwards selected APIs calls to active cluster

func NewSelectedAPIsForwardingPolicy added in v0.5.9

func NewSelectedAPIsForwardingPolicy(currentClusterName string, config *Config, namespaceCache cache.NamespaceCache) *SelectedAPIsForwardingRedirectionPolicy

NewSelectedAPIsForwardingPolicy creates a forwarding policy for selected APIs based on namespace

func (*SelectedAPIsForwardingRedirectionPolicy) WithNamespaceIDRedirect added in v0.27.0

func (policy *SelectedAPIsForwardingRedirectionPolicy) WithNamespaceIDRedirect(ctx context.Context, namespaceID string, apiName string, call func(string) error) error

WithNamespaceIDRedirect redirect the API call based on namespace ID

func (*SelectedAPIsForwardingRedirectionPolicy) WithNamespaceRedirect added in v0.27.0

func (policy *SelectedAPIsForwardingRedirectionPolicy) WithNamespaceRedirect(ctx context.Context, namespace string, apiName string, call func(string) error) error

WithNamespaceRedirect redirect the API call based on namespace name

type Service

type Service struct {
	resource.Resource
	// contains filtered or unexported fields
}

Service represents the 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 VersionChecker added in v1.1.0

type VersionChecker struct {
	resource.Resource
	// contains filtered or unexported fields
}

func NewVersionChecker added in v1.1.0

func NewVersionChecker(
	resource resource.Resource,
	params *resource.BootstrapParams,
	config *Config,
) *VersionChecker

func (*VersionChecker) Start added in v1.1.0

func (vc *VersionChecker) Start()

func (*VersionChecker) Stop added in v1.1.0

func (vc *VersionChecker) Stop()

type WorkflowHandler

type WorkflowHandler struct {
	resource.Resource
	// contains filtered or unexported fields
}

WorkflowHandler - gRPC handler interface for workflowservice

func (*WorkflowHandler) CountWorkflowExecutions added in v0.5.8

func (wh *WorkflowHandler) CountWorkflowExecutions(ctx context.Context, request *workflowservice.CountWorkflowExecutionsRequest) (_ *workflowservice.CountWorkflowExecutionsResponse, retError error)

CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.

func (*WorkflowHandler) DeprecateNamespace added in v0.27.0

func (wh *WorkflowHandler) DeprecateNamespace(ctx context.Context, request *workflowservice.DeprecateNamespaceRequest) (_ *workflowservice.DeprecateNamespaceResponse, retError error)

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

func (*WorkflowHandler) DescribeNamespace added in v0.27.0

func (wh *WorkflowHandler) DescribeNamespace(ctx context.Context, request *workflowservice.DescribeNamespaceRequest) (_ *workflowservice.DescribeNamespaceResponse, retError error)

DescribeNamespace returns the information and configuration for a registered namespace.

func (*WorkflowHandler) DescribeTaskQueue added in v0.27.0

func (wh *WorkflowHandler) DescribeTaskQueue(ctx context.Context, request *workflowservice.DescribeTaskQueueRequest) (_ *workflowservice.DescribeTaskQueueResponse, retError error)

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

func (*WorkflowHandler) DescribeWorkflowExecution added in v0.3.3

func (wh *WorkflowHandler) DescribeWorkflowExecution(ctx context.Context, request *workflowservice.DescribeWorkflowExecutionRequest) (_ *workflowservice.DescribeWorkflowExecutionResponse, retError error)

DescribeWorkflowExecution returns information about the specified workflow execution.

func (*WorkflowHandler) GetClusterInfo added in v0.27.0

func (wh *WorkflowHandler) GetClusterInfo(ctx context.Context, _ *workflowservice.GetClusterInfoRequest) (_ *workflowservice.GetClusterInfoResponse, retError error)

GetClusterInfo return information about Temporal deployment.

func (*WorkflowHandler) GetConfig added in v0.27.0

func (wh *WorkflowHandler) GetConfig() *Config

GetConfig return config

func (*WorkflowHandler) GetResource added in v0.27.0

func (wh *WorkflowHandler) GetResource() resource.Resource

GetResource return resource

func (*WorkflowHandler) GetSearchAttributes added in v0.5.9

func (wh *WorkflowHandler) GetSearchAttributes(ctx context.Context, _ *workflowservice.GetSearchAttributesRequest) (_ *workflowservice.GetSearchAttributesResponse, retError error)

GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs

func (*WorkflowHandler) GetWorkflowExecutionHistory

func (wh *WorkflowHandler) GetWorkflowExecutionHistory(ctx context.Context, request *workflowservice.GetWorkflowExecutionHistoryRequest) (_ *workflowservice.GetWorkflowExecutionHistoryResponse, retError error)

GetWorkflowExecutionHistory returns the history of specified workflow execution. It fails with 'EntityNotExistError' if speficied workflow execution in unknown to the service.

func (*WorkflowHandler) ListArchivedWorkflowExecutions added in v0.27.0

func (wh *WorkflowHandler) ListArchivedWorkflowExecutions(ctx context.Context, request *workflowservice.ListArchivedWorkflowExecutionsRequest) (_ *workflowservice.ListArchivedWorkflowExecutionsResponse, retError error)

ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.

func (*WorkflowHandler) ListClosedWorkflowExecutions

func (wh *WorkflowHandler) ListClosedWorkflowExecutions(ctx context.Context, request *workflowservice.ListClosedWorkflowExecutionsRequest) (_ *workflowservice.ListClosedWorkflowExecutionsResponse, retError error)

ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace.

func (*WorkflowHandler) ListNamespaces added in v0.27.0

func (wh *WorkflowHandler) ListNamespaces(ctx context.Context, request *workflowservice.ListNamespacesRequest) (_ *workflowservice.ListNamespacesResponse, retError error)

ListNamespaces returns the information and configuration for all namespaces.

func (*WorkflowHandler) ListOpenWorkflowExecutions

func (wh *WorkflowHandler) ListOpenWorkflowExecutions(ctx context.Context, request *workflowservice.ListOpenWorkflowExecutionsRequest) (_ *workflowservice.ListOpenWorkflowExecutionsResponse, retError error)

ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace.

func (*WorkflowHandler) ListTaskQueuePartitions added in v0.27.0

func (wh *WorkflowHandler) ListTaskQueuePartitions(ctx context.Context, request *workflowservice.ListTaskQueuePartitionsRequest) (_ *workflowservice.ListTaskQueuePartitionsResponse, retError error)

ListTaskQueuePartitions returns all the partition and host for a task queue.

func (*WorkflowHandler) ListWorkflowExecutions added in v0.5.7

func (wh *WorkflowHandler) ListWorkflowExecutions(ctx context.Context, request *workflowservice.ListWorkflowExecutionsRequest) (_ *workflowservice.ListWorkflowExecutionsResponse, retError error)

ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.

func (*WorkflowHandler) PollActivityTaskQueue added in v0.27.0

func (wh *WorkflowHandler) PollActivityTaskQueue(ctx context.Context, request *workflowservice.PollActivityTaskQueueRequest) (_ *workflowservice.PollActivityTaskQueueResponse, retError error)

PollActivityTaskQueue is called by application worker to process ActivityTask from a specific task queue. ActivityTask is dispatched to callers whenever a ScheduleTask command is made for a workflow execution. Application is expected to call 'RespondActivityTaskCompleted' or 'RespondActivityTaskFailed' once it is done processing the task. Application also needs to call 'RecordActivityTaskHeartbeat' API within 'heartbeatTimeoutSeconds' interval to prevent the task from getting timed out. An event 'ActivityTaskStarted' event is also written to workflow execution history before the ActivityTask is dispatched to application worker.

func (*WorkflowHandler) PollWorkflowTaskQueue added in v0.27.0

func (wh *WorkflowHandler) PollWorkflowTaskQueue(ctx context.Context, request *workflowservice.PollWorkflowTaskQueueRequest) (_ *workflowservice.PollWorkflowTaskQueueResponse, retError error)

PollWorkflowTaskQueue is called by application worker to process WorkflowTask from a specific task queue. A WorkflowTask is dispatched to callers for active workflow executions, with pending workflow tasks. Application is then expected to call 'RespondWorkflowTaskCompleted' API when it is done processing the WorkflowTask. It will also create a 'WorkflowTaskStarted' event in the history for that session before handing off WorkflowTask to application worker.

func (*WorkflowHandler) QueryWorkflow added in v0.3.2

func (wh *WorkflowHandler) QueryWorkflow(ctx context.Context, request *workflowservice.QueryWorkflowRequest) (_ *workflowservice.QueryWorkflowResponse, retError error)

QueryWorkflow returns query result for a specified workflow execution

func (*WorkflowHandler) RecordActivityTaskHeartbeat

func (wh *WorkflowHandler) RecordActivityTaskHeartbeat(ctx context.Context, request *workflowservice.RecordActivityTaskHeartbeatRequest) (_ *workflowservice.RecordActivityTaskHeartbeatResponse, retError error)

RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeat' will fail with 'EntityNotExistsError' in such situations. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for heartbeating.

func (*WorkflowHandler) RecordActivityTaskHeartbeatById added in v0.27.0

func (wh *WorkflowHandler) RecordActivityTaskHeartbeatById(ctx context.Context, request *workflowservice.RecordActivityTaskHeartbeatByIdRequest) (_ *workflowservice.RecordActivityTaskHeartbeatByIdResponse, retError error)

RecordActivityTaskHeartbeatById is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeatById' will fail with 'EntityNotExistsError' in such situations. Instead of using 'taskToken' like in RecordActivityTaskHeartbeat, use Namespace, WorkflowID and ActivityID

func (*WorkflowHandler) RegisterNamespace added in v0.27.0

func (wh *WorkflowHandler) RegisterNamespace(ctx context.Context, request *workflowservice.RegisterNamespaceRequest) (_ *workflowservice.RegisterNamespaceResponse, retError error)

RegisterNamespace creates a new namespace which can be used as a container for all resources. Namespace is a top level entity within Temporal, used as a container for all resources like workflow executions, taskqueues, etc. Namespace acts as a sandbox and provides isolation for all resources within the namespace. All resources belongs to exactly one namespace.

func (*WorkflowHandler) RequestCancelWorkflowExecution

func (wh *WorkflowHandler) RequestCancelWorkflowExecution(ctx context.Context, request *workflowservice.RequestCancelWorkflowExecutionRequest) (_ *workflowservice.RequestCancelWorkflowExecutionResponse, retError error)

RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow instance. It will result in a new 'WorkflowExecutionCancelRequested' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. It fails with 'EntityNotExistsError' if the workflow is not valid anymore due to completion or doesn't exist.

func (*WorkflowHandler) ResetStickyTaskQueue added in v0.27.0

func (wh *WorkflowHandler) ResetStickyTaskQueue(ctx context.Context, request *workflowservice.ResetStickyTaskQueueRequest) (_ *workflowservice.ResetStickyTaskQueueResponse, retError error)

ResetStickyTaskQueue resets the sticky taskqueue related information in mutable state of a given workflow. Things cleared are: 1. StickyTaskQueue 2. StickyScheduleToStartTimeout

func (*WorkflowHandler) ResetWorkflowExecution added in v0.5.2

func (wh *WorkflowHandler) ResetWorkflowExecution(ctx context.Context, request *workflowservice.ResetWorkflowExecutionRequest) (_ *workflowservice.ResetWorkflowExecutionResponse, retError error)

ResetWorkflowExecution reset an existing workflow execution to WorkflowTaskCompleted event(exclusive). And it will immediately terminating the current execution instance.

func (*WorkflowHandler) RespondActivityTaskCanceled

func (wh *WorkflowHandler) RespondActivityTaskCanceled(ctx context.Context, request *workflowservice.RespondActivityTaskCanceledRequest) (_ *workflowservice.RespondActivityTaskCanceledResponse, retError error)

RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskCanceledById added in v0.27.0

func (wh *WorkflowHandler) RespondActivityTaskCanceledById(ctx context.Context, request *workflowservice.RespondActivityTaskCanceledByIdRequest) (_ *workflowservice.RespondActivityTaskCanceledByIdResponse, retError error)

RespondActivityTaskCanceledById is called by application worker when it is successfully canceled an ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Similar to RespondActivityTaskCanceled but use Namespace, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskCompleted

func (wh *WorkflowHandler) RespondActivityTaskCompleted(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskCompletedRequest,
) (_ *workflowservice.RespondActivityTaskCompletedResponse, retError error)

RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new WorkflowTask created for the workflow so new commands could be made. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for completion. It fails with 'NotFoundFailure' if the taskToken is not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskCompletedById added in v0.27.0

func (wh *WorkflowHandler) RespondActivityTaskCompletedById(ctx context.Context, request *workflowservice.RespondActivityTaskCompletedByIdRequest) (_ *workflowservice.RespondActivityTaskCompletedByIdResponse, retError error)

RespondActivityTaskCompletedById is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new WorkflowTask created for the workflow so new commands could be made. Similar to RespondActivityTaskCompleted but use Namespace, WorkflowId and ActivityId instead of 'taskToken' for completion. It fails with 'NotFoundFailure' if the these Ids are not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskFailed

func (wh *WorkflowHandler) RespondActivityTaskFailed(
	ctx context.Context,
	request *workflowservice.RespondActivityTaskFailedRequest,
) (_ *workflowservice.RespondActivityTaskFailedResponse, retError error)

RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskFailedById added in v0.27.0

func (wh *WorkflowHandler) RespondActivityTaskFailedById(ctx context.Context, request *workflowservice.RespondActivityTaskFailedByIdRequest) (_ *workflowservice.RespondActivityTaskFailedByIdResponse, retError error)

RespondActivityTaskFailedById is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Similar to RespondActivityTaskFailed but use Namespace, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondQueryTaskCompleted added in v0.3.2

func (wh *WorkflowHandler) RespondQueryTaskCompleted(
	ctx context.Context,
	request *workflowservice.RespondQueryTaskCompletedRequest,
) (_ *workflowservice.RespondQueryTaskCompletedResponse, retError error)

RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a WorkflowTask for query) as a result of 'PollWorkflowTaskQueue' API call. Completing a QueryTask will unblock the client call to 'QueryWorkflow' API and return the query result to client as a response to 'QueryWorkflow' API call.

func (*WorkflowHandler) RespondWorkflowTaskCompleted added in v0.27.0

func (wh *WorkflowHandler) RespondWorkflowTaskCompleted(
	ctx context.Context,
	request *workflowservice.RespondWorkflowTaskCompletedRequest,
) (_ *workflowservice.RespondWorkflowTaskCompletedResponse, retError error)

RespondWorkflowTaskCompleted is called by application worker to complete a WorkflowTask handed as a result of 'PollWorkflowTaskQueue' API call. Completing a WorkflowTask will result in new events for the workflow execution and potentially new ActivityTask being created for corresponding commands. It will also create a WorkflowTaskCompleted event in the history for that session. Use the 'taskToken' provided as response of PollWorkflowTaskQueue API call for completing the WorkflowTask. The response could contain a new workflow task if there is one or if the request asking for one.

func (*WorkflowHandler) RespondWorkflowTaskFailed added in v0.27.0

func (wh *WorkflowHandler) RespondWorkflowTaskFailed(
	ctx context.Context,
	request *workflowservice.RespondWorkflowTaskFailedRequest,
) (_ *workflowservice.RespondWorkflowTaskFailedResponse, retError error)

RespondWorkflowTaskFailed is called by application worker to indicate failure. This results in WorkflowTaskFailedEvent written to the history and a new WorkflowTask created. This API can be used by client to either clear sticky taskqueue or report any panics during WorkflowTask processing. Temporal will only append first WorkflowTaskFailed event to the history of workflow execution for consecutive failures.

func (*WorkflowHandler) ScanWorkflowExecutions added in v0.5.8

func (wh *WorkflowHandler) ScanWorkflowExecutions(ctx context.Context, request *workflowservice.ScanWorkflowExecutionsRequest) (_ *workflowservice.ScanWorkflowExecutionsResponse, retError error)

ScanWorkflowExecutions is a visibility API to list large amount of workflow executions in a specific namespace without order.

func (*WorkflowHandler) SignalWithStartWorkflowExecution added in v0.3.11

func (wh *WorkflowHandler) SignalWithStartWorkflowExecution(ctx context.Context, request *workflowservice.SignalWithStartWorkflowExecutionRequest) (_ *workflowservice.SignalWithStartWorkflowExecutionResponse, retError error)

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

func (*WorkflowHandler) SignalWorkflowExecution

func (wh *WorkflowHandler) SignalWorkflowExecution(ctx context.Context, request *workflowservice.SignalWorkflowExecutionRequest) (_ *workflowservice.SignalWorkflowExecutionResponse, retError error)

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

func (*WorkflowHandler) Start

func (wh *WorkflowHandler) Start()

Start starts the handler

func (*WorkflowHandler) StartWorkflowExecution

func (wh *WorkflowHandler) StartWorkflowExecution(ctx context.Context, request *workflowservice.StartWorkflowExecutionRequest) (_ *workflowservice.StartWorkflowExecutionResponse, retError error)

StartWorkflowExecution starts a new long running workflow instance. It will create the instance with 'WorkflowExecutionStarted' event in history and also schedule the first WorkflowTask for the worker to make the first workflow task for this instance. It will return 'WorkflowExecutionAlreadyStartedError', if an instance already exists with same workflowId.

func (*WorkflowHandler) Stop

func (wh *WorkflowHandler) Stop()

Stop stops the handler

func (*WorkflowHandler) TerminateWorkflowExecution

func (wh *WorkflowHandler) TerminateWorkflowExecution(ctx context.Context, request *workflowservice.TerminateWorkflowExecutionRequest) (_ *workflowservice.TerminateWorkflowExecutionResponse, retError error)

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

func (*WorkflowHandler) UpdateHealthStatus added in v0.27.0

func (wh *WorkflowHandler) UpdateHealthStatus(status HealthStatus)

UpdateHealthStatus sets the health status for this rpc handler. This health status will be used within the rpc health check handler

func (*WorkflowHandler) UpdateNamespace added in v0.27.0

func (wh *WorkflowHandler) UpdateNamespace(ctx context.Context, request *workflowservice.UpdateNamespaceRequest) (_ *workflowservice.UpdateNamespaceResponse, retError error)

UpdateNamespace is used to update the information and configuration for a registered namespace.

func (*WorkflowHandler) Watch added in v0.27.0

Jump to

Keyboard shortcuts

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