Documentation ¶
Index ¶
- Constants
- type Data
- type Definition
- type NodeBackend
- func (n *NodeBackend) AddHistoryEvent(t enumspb.EventType, setAttributes func(*historypb.HistoryEvent)) *historypb.HistoryEvent
- func (n *NodeBackend) GenerateEventLoadToken(event *historypb.HistoryEvent) ([]byte, error)
- func (n *NodeBackend) GetCurrentVersion() int64
- func (n *NodeBackend) LoadHistoryEvent(ctx context.Context, tokenBytes []byte) (*historypb.HistoryEvent, error)
- func (n *NodeBackend) NextTransitionCount() int64
- type State
- type Task
- type TaskSerializer
Constants ¶
View Source
const TaskType = "test-task-type-name"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func NewDefinition ¶
func NewDefinition(typeName string) Definition
func (Definition) CompareState ¶
func (d Definition) CompareState(s1 any, s2 any) (int, error)
func (Definition) Deserialize ¶
func (d Definition) Deserialize(b []byte) (any, error)
func (Definition) Serialize ¶
func (d Definition) Serialize(s any) ([]byte, error)
Serialize implements hsm.StateMachineDefinition.
func (Definition) Type ¶
func (d Definition) Type() string
Type implements hsm.StateMachineDefinition.
type NodeBackend ¶
type NodeBackend struct {
Events []*historypb.HistoryEvent
}
func (*NodeBackend) AddHistoryEvent ¶
func (n *NodeBackend) AddHistoryEvent(t enumspb.EventType, setAttributes func(*historypb.HistoryEvent)) *historypb.HistoryEvent
func (*NodeBackend) GenerateEventLoadToken ¶
func (n *NodeBackend) GenerateEventLoadToken(event *historypb.HistoryEvent) ([]byte, error)
func (*NodeBackend) GetCurrentVersion ¶
func (n *NodeBackend) GetCurrentVersion() int64
func (*NodeBackend) LoadHistoryEvent ¶
func (n *NodeBackend) LoadHistoryEvent(ctx context.Context, tokenBytes []byte) (*historypb.HistoryEvent, error)
func (*NodeBackend) NextTransitionCount ¶
func (n *NodeBackend) NextTransitionCount() int64
type Task ¶
type Task struct { IsConcurrent bool // contains filtered or unexported fields }
func (*Task) Concurrent ¶
Click to show internal directories.
Click to hide internal directories.