state

package
v1.15.12 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	AppID             string
	WorkflowActorType string
	ActivityActorType string
}

type State

type State struct {
	Inbox        []*backend.HistoryEvent
	History      []*backend.HistoryEvent
	CustomStatus *wrapperspb.StringValue
	Generation   uint64
	// contains filtered or unexported fields
}

func LoadWorkflowState

func LoadWorkflowState(ctx context.Context, state state.Interface, actorID string, opts Options) (*State, error)

func NewState

func NewState(opts Options) *State

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) GetPurgeRequest

func (s *State) GetPurgeRequest(actorID string) (*api.TransactionalRequest, error)

func (*State) GetSaveRequest

func (s *State) GetSaveRequest(actorID string) (*api.TransactionalRequest, error)

func (*State) Reset

func (s *State) Reset()

func (*State) ResetChangeTracking

func (s *State) ResetChangeTracking()

ResetChangeTracking resets the change tracking counters. This should be called after a save request.

func (*State) String

func (s *State) String() string

String implements fmt.Stringer and is primarily used for debugging purposes.

Jump to

Keyboard shortcuts

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