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 FlowState
- 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 FlowInfo ¶
type FlowInfo struct { Id string `json:"id"` FlowURI string `json:"flowURI,omitempty"` FlowName string `json:"flowName,omitempty"` Status int `json:"status,omitempty"` HostId string `json:"hostid,omitempty"` FlowStatus string `json:"flowStatus,omitempty"` FlowInputs map[string]interface{} `json:"flowInputs"` StartTime string `json:"starttime,omitempty"` EndTime string `json:"endtime,omitempty"` ExecutionTime string `json:"executiontime,omitempty"` RerunCount int `json:"rerunCount"` OriginalInstanceId string `json:"originalInstanceId"` }
type FlowState ¶
type FlowState struct { UserId string `json:"user_id"` AppName string `json:"app_name"` AppVersion string `json:"app_version"` HostId string `json:"host_id"` FlowName string `json:"flow_name"` FlowInstanceId string `json:"flow_instance_id"` FlowInputs map[string]interface{} `json:"flow_inputs"` FlowOutputs map[string]interface{} `json:"flow_outputs"` FlowStats string `json:"flow_stats"` RerunCount int `json:"rerun_count"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` OriginalInstanceId string `json:"original_instance_id"` }
type Recorder ¶
type Recorder interface { RecordStart(state *FlowState) error // 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 RecordDone(state *FlowState) 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 Step ¶
type Step struct { //*Master Id int `json:"id"` FlowId string `json:"flowId"` FlowChanges map[int]*change.Flow `json:"flowChanges"` QueueChanges map[int]*change.Queue `json:"queueChanges,omitempty"` StartTime time.Time `json:"starttime"` EndTime time.Time `json:"endtime"` Rerun bool `json:"rerun"` }
type Subflow ¶
type Subflow struct { *SnapshotBase Id int `json:"id"` TaskId string `json:"taskId"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.