Documentation
¶
Index ¶
- Constants
- type Options
- type State
- func (s *State) AddToHistory(e *backend.HistoryEvent)
- func (s *State) AddToInbox(e *backend.HistoryEvent)
- func (s *State) ApplyRuntimeStateChanges(rs *backend.OrchestrationRuntimeState)
- func (s *State) ClearInbox()
- func (s *State) FromWorkflowState(state *backend.WorkflowState)
- func (s *State) GetPurgeRequest(actorID string) (*api.TransactionalRequest, error)
- func (s *State) GetSaveRequest(actorID string) (*api.TransactionalRequest, error)
- func (s *State) MetadataETag() *string
- func (s *State) Reset()
- func (s *State) ResetChangeTracking()
- func (s *State) SetMetadataETag(etag *string)
- func (s *State) String() string
- func (s *State) ToWorkflowState() *backend.WorkflowState
Constants ¶
View Source
const ( // MetadataKey is the state-store key holding the workflow's metadata row // (history/inbox lengths + generation). Exported so other packages can // refresh just this row to pick up the latest ETag without reloading the // full workflow state. MetadataKey = "metadata" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
Inbox []*backend.HistoryEvent
History []*backend.HistoryEvent
CustomStatus *wrapperspb.StringValue
Generation uint64
// contains filtered or unexported fields
}
func LoadWorkflowState ¶
func (*State) AddToHistory ¶ added in v1.16.0
func (s *State) AddToHistory(e *backend.HistoryEvent)
func (*State) AddToInbox ¶
func (s *State) AddToInbox(e *backend.HistoryEvent)
func (*State) ApplyRuntimeStateChanges ¶
func (s *State) ApplyRuntimeStateChanges(rs *backend.OrchestrationRuntimeState)
func (*State) ClearInbox ¶
func (s *State) ClearInbox()
func (*State) FromWorkflowState ¶ added in v1.16.0
func (s *State) FromWorkflowState(state *backend.WorkflowState)
func (*State) GetPurgeRequest ¶
func (s *State) GetPurgeRequest(actorID string) (*api.TransactionalRequest, error)
func (*State) GetSaveRequest ¶
func (s *State) GetSaveRequest(actorID string) (*api.TransactionalRequest, error)
func (*State) MetadataETag ¶ added in v1.17.7
MetadataETag returns the cached metadata ETag, or nil if none is known. Callers performing optimistic concurrency pass this through to the metadata TransactionalUpsert via [GetSaveRequest].
func (*State) ResetChangeTracking ¶
func (s *State) ResetChangeTracking()
ResetChangeTracking resets the change tracking counters. This should be called after a save request.
func (*State) SetMetadataETag ¶ added in v1.17.7
SetMetadataETag updates the cached metadata ETag. Called after a successful save to record the new row-version token returned by a follow-up metadata-only Get, so the next save can present it as the prior ETag for the optimistic-concurrency check.
func (*State) ToWorkflowState ¶ added in v1.16.0
func (s *State) ToWorkflowState() *backend.WorkflowState
Click to show internal directories.
Click to hide internal directories.