Documentation ¶
Index ¶
- Variables
- func BypassMutableStateConsistencyPredicate(mutableState workflow.MutableState) bool
- func CreateMutableState(shard shard.Context, namespaceEntry *namespace.Namespace, runID string) (workflow.MutableState, error)
- func FailMutableStateConsistencyPredicate(mutableState workflow.MutableState) bool
- func GenerateFirstWorkflowTask(mutableState workflow.MutableState, ...) error
- func IsRetryableError(err error) bool
- func NewWorkflowVersionCheck(shard shard.Context, prevLastWriteVersion int64, ...) error
- func UpdateWorkflowWithNew(shard shard.Context, ctx context.Context, workflowContext WorkflowContext, ...) (retError error)
- func ValidateSignal(ctx context.Context, shard shard.Context, mutableState workflow.MutableState, ...) error
- func ValidateStart(ctx context.Context, shard shard.Context, namespaceEntry *namespace.Namespace, ...) error
- type CreateWorkflowCASPredicate
- type MutableStateConsistencyPredicate
- type UpdateWorkflowAction
- type UpdateWorkflowActionFunc
- type WorkflowConsistencyChecker
- type WorkflowConsistencyCheckerImpl
- type WorkflowContext
- type WorkflowContextImpl
- func (w *WorkflowContextImpl) GetContext() workflow.Context
- func (w *WorkflowContextImpl) GetMutableState() workflow.MutableState
- func (w *WorkflowContextImpl) GetNamespaceEntry() *namespace.Namespace
- func (w *WorkflowContextImpl) GetNamespaceID() namespace.ID
- func (w *WorkflowContextImpl) GetReleaseFn() workflow.ReleaseCacheFunc
- func (w *WorkflowContextImpl) GetRunID() string
- func (w *WorkflowContextImpl) GetWorkflowID() string
- func (w *WorkflowContextImpl) GetWorkflowKey() definition.WorkflowKey
- func (w *WorkflowContextImpl) ReloadMutableState(ctx context.Context) (workflow.MutableState, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UpdateWorkflowWithNewWorkflowTask = &UpdateWorkflowAction{ CreateWorkflowTask: true, } UpdateWorkflowWithoutWorkflowTask = &UpdateWorkflowAction{ CreateWorkflowTask: false, } )
Functions ¶
func BypassMutableStateConsistencyPredicate ¶
func BypassMutableStateConsistencyPredicate( mutableState workflow.MutableState, ) bool
func CreateMutableState ¶
func FailMutableStateConsistencyPredicate ¶
func FailMutableStateConsistencyPredicate( mutableState workflow.MutableState, ) bool
func GenerateFirstWorkflowTask ¶
func GenerateFirstWorkflowTask( mutableState workflow.MutableState, parentInfo *workflowspb.ParentExecutionInfo, startEvent *historypb.HistoryEvent, ) error
func IsRetryableError ¶ added in v1.17.3
func NewWorkflowVersionCheck ¶
func UpdateWorkflowWithNew ¶
func UpdateWorkflowWithNew( shard shard.Context, ctx context.Context, workflowContext WorkflowContext, action UpdateWorkflowActionFunc, newWorkflowFn func() (workflow.Context, workflow.MutableState, error), ) (retError error)
func ValidateSignal ¶
Types ¶
type MutableStateConsistencyPredicate ¶
type MutableStateConsistencyPredicate func(mutableState workflow.MutableState) bool
func HistoryEventConsistencyPredicate ¶
func HistoryEventConsistencyPredicate( eventID int64, eventVersion int64, ) MutableStateConsistencyPredicate
type UpdateWorkflowAction ¶
type UpdateWorkflowActionFunc ¶
type UpdateWorkflowActionFunc func(WorkflowContext) (*UpdateWorkflowAction, error)
func ApplyWorkflowIDReusePolicy ¶
func ApplyWorkflowIDReusePolicy( prevStartRequestID, prevRunID string, prevState enumsspb.WorkflowExecutionState, prevStatus enumspb.WorkflowExecutionStatus, workflowID string, runID string, wfIDReusePolicy enumspb.WorkflowIdReusePolicy, ) (UpdateWorkflowActionFunc, error)
ApplyWorkflowIDReusePolicy returns updateWorkflowActionFunc for updating the previous execution and an error if the situation is not allowed by the workflowIDReusePolicy. Both result may be nil, if the case is to allow and no update is needed for the previous execution.
type WorkflowConsistencyChecker ¶
type WorkflowConsistencyChecker interface { GetCurrentRunID( ctx context.Context, namespaceID string, workflowID string, ) (string, error) GetWorkflowContext( ctx context.Context, reqClock *clockspb.VectorClock, consistencyPredicate MutableStateConsistencyPredicate, workflowKey definition.WorkflowKey, ) (WorkflowContext, error) }
type WorkflowConsistencyCheckerImpl ¶
type WorkflowConsistencyCheckerImpl struct {
// contains filtered or unexported fields
}
func NewWorkflowConsistencyChecker ¶
func NewWorkflowConsistencyChecker( shardContext shard.Context, workflowCache workflow.Cache, ) *WorkflowConsistencyCheckerImpl
func (*WorkflowConsistencyCheckerImpl) GetCurrentRunID ¶
func (*WorkflowConsistencyCheckerImpl) GetWorkflowContext ¶
func (c *WorkflowConsistencyCheckerImpl) GetWorkflowContext( ctx context.Context, reqClock *clockspb.VectorClock, consistencyPredicate MutableStateConsistencyPredicate, workflowKey definition.WorkflowKey, ) (WorkflowContext, error)
type WorkflowContext ¶
type WorkflowContext interface { GetContext() workflow.Context GetMutableState() workflow.MutableState ReloadMutableState(context.Context) (workflow.MutableState, error) GetReleaseFn() workflow.ReleaseCacheFunc GetNamespaceID() namespace.ID GetWorkflowID() string GetRunID() string GetNamespaceEntry() *namespace.Namespace GetWorkflowKey() definition.WorkflowKey }
func NewWorkflowWithSignal ¶
type WorkflowContextImpl ¶
type WorkflowContextImpl struct {
// contains filtered or unexported fields
}
func NewWorkflowContext ¶
func NewWorkflowContext( context workflow.Context, releaseFn workflow.ReleaseCacheFunc, mutableState workflow.MutableState, ) *WorkflowContextImpl
func (*WorkflowContextImpl) GetContext ¶
func (w *WorkflowContextImpl) GetContext() workflow.Context
func (*WorkflowContextImpl) GetMutableState ¶
func (w *WorkflowContextImpl) GetMutableState() workflow.MutableState
func (*WorkflowContextImpl) GetNamespaceEntry ¶
func (w *WorkflowContextImpl) GetNamespaceEntry() *namespace.Namespace
func (*WorkflowContextImpl) GetNamespaceID ¶
func (w *WorkflowContextImpl) GetNamespaceID() namespace.ID
func (*WorkflowContextImpl) GetReleaseFn ¶
func (w *WorkflowContextImpl) GetReleaseFn() workflow.ReleaseCacheFunc
func (*WorkflowContextImpl) GetRunID ¶
func (w *WorkflowContextImpl) GetRunID() string
func (*WorkflowContextImpl) GetWorkflowID ¶
func (w *WorkflowContextImpl) GetWorkflowID() string
func (*WorkflowContextImpl) GetWorkflowKey ¶
func (w *WorkflowContextImpl) GetWorkflowKey() definition.WorkflowKey
func (*WorkflowContextImpl) ReloadMutableState ¶
func (w *WorkflowContextImpl) ReloadMutableState( ctx context.Context, ) (workflow.MutableState, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.