Documentation
¶
Index ¶
- func CloseDB() error
- func CompleteActionExecution(id int64, status string, errorMsg *string, output *string, ...) error
- func CompleteWorkflowExecution(id int64, status string, errorMsg *string, duration time.Duration) error
- func GetDB() *sql.DB
- func InitDB(dbPath string) error
- func StartActionExecution(workflowExecID int64, actionName, actionType string) (int64, error)
- func StartWorkflowExecution(workflowName, triggerType string) (int64, error)
- type ActionExecution
- type WorkflowExecution
- type WorkflowStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteActionExecution ¶
func CompleteActionExecution(id int64, status string, errorMsg *string, output *string, duration time.Duration) error
CompleteActionExecution updates an action execution as completed
func CompleteWorkflowExecution ¶
func CompleteWorkflowExecution(id int64, status string, errorMsg *string, duration time.Duration) error
CompleteWorkflowExecution updates a workflow execution as completed
func StartActionExecution ¶
StartActionExecution creates a new action execution record
func StartWorkflowExecution ¶
StartWorkflowExecution creates a new workflow execution record
Types ¶
type ActionExecution ¶
type ActionExecution struct {
ID int64
WorkflowExecutionID int64
ActionName string
ActionType string
StartedAt time.Time
CompletedAt *time.Time
Status string // running, success, failed
Error *string
DurationMs *int64
Output *string
}
ActionExecution represents an action execution record
type WorkflowExecution ¶
type WorkflowExecution struct {
ID int64
WorkflowName string
StartedAt time.Time
CompletedAt *time.Time
Status string // running, success, failed
Error *string
DurationMs *int64
TriggerType string
}
WorkflowExecution represents a workflow execution record
func GetAllWorkflowHistory ¶
func GetAllWorkflowHistory(limit int) ([]WorkflowExecution, error)
GetAllWorkflowHistory returns recent executions for all workflows
func GetFailedExecutions ¶
func GetFailedExecutions(since time.Time, limit int) ([]WorkflowExecution, error)
GetFailedExecutions returns recent failed workflow executions
func GetWorkflowHistory ¶
func GetWorkflowHistory(workflowName string, limit int) ([]WorkflowExecution, error)
GetWorkflowHistory returns recent workflow executions
type WorkflowStats ¶
type WorkflowStats struct {
WorkflowName string
TotalExecutions int
SuccessCount int
FailedCount int
SuccessRate float64
AvgDurationMs float64
}
GetWorkflowStats returns statistics for a workflow
func GetWorkflowStats ¶
func GetWorkflowStats(workflowName string, since time.Time) (*WorkflowStats, error)
Click to show internal directories.
Click to hide internal directories.