Documentation
¶
Index ¶
- func RecordSnapshot(stateRecordingMode RecordingMode) bool
- func RecordSteps(stateRecordingMode RecordingMode) bool
- func UpdateFlow(s *SnapshotBase, change *change.Flow)
- func UpdateLinks(snapshot *SnapshotBase, linkId int, change *change.Link)
- func UpdateQueue(fs *Snapshot, id int, queueChg *change.Queue, first *int) bool
- func UpdateTasks(snapshot *SnapshotBase, taskId string, change *change.Task)
- type FlowInfo
- type Link
- type Recorder
- type RecordingMode
- type Snapshot
- type SnapshotBase
- type Step
- type Subflow
- type Task
- type WorkItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordSnapshot ¶
func RecordSnapshot(stateRecordingMode RecordingMode) bool
RecordSnapshot check to see if enbale snapshot recording
func RecordSteps ¶
func RecordSteps(stateRecordingMode RecordingMode) bool
RecordSteps check to see if enbale step recording
func UpdateFlow ¶
func UpdateFlow(s *SnapshotBase, change *change.Flow)
func UpdateLinks ¶
func UpdateLinks(snapshot *SnapshotBase, linkId int, change *change.Link)
func UpdateTasks ¶
func UpdateTasks(snapshot *SnapshotBase, taskId string, change *change.Task)
Types ¶
type Recorder ¶
type Recorder interface { // RecordSnapshot records a Snapshot of the FlowInstance RecordSnapshot(snapshot *Snapshot) error // RecordStep records the changes for the current Step of the Flow Instance RecordStep(step *Step) error }
Recorder is the interface that describes a service that can record snapshots and steps of a Flow Instance
type RecordingMode ¶
type RecordingMode string
const ( // RecordingModeOff indicates that the recording been turned off RecordingModeOff RecordingMode = "off" // RecordingModeDebugger incicates that the state recording store steps data as well as task's input RecordingModeDebugger RecordingMode = "debugger" // RecordingModeStep incicates that the state recording to store steps data only RecordingModeStep RecordingMode = "step" // RecordingModeFull incicates that the state recording to store both steps and snapshot data RecordingModeFull RecordingMode = "full" // RecordingModeSnapshot incicates that the state recording to store snapshot data only RecordingModeSnapshot RecordingMode = "snapshot" )
func ToRecordingMode ¶
func ToRecordingMode(mode interface{}) (RecordingMode, error)
ToRecordingMode convert data to recording model const
type Snapshot ¶
type Snapshot struct { *SnapshotBase Id string `json:"id"` WorkQueue []*WorkItem `json:"workQueue,omitempty"` Subflows []*Subflow `json:"subflows,omitempty"` }
func StepsToSnapshot ¶
type SnapshotBase ¶
type Subflow ¶
type Subflow struct { *SnapshotBase Id int `json:"id"` TaskId string `json:"taskId"` }
Click to show internal directories.
Click to hide internal directories.