Documentation
¶
Index ¶
- type SQLite
- func (s *SQLite) CompleteQueueTask(queueID string) (string, error)
- func (s *SQLite) CreateFlow(name string, description string) (string, error)
- func (s *SQLite) CreateFlowVersion(flowID string, version int, definitionJSON string, status string) (string, error)
- func (s *SQLite) CreateNodeRun(nr map[string]interface{}) error
- func (s *SQLite) CreateTask(flowVersionID string, paramsJSON string, requestID string, startNode string) (string, error)
- func (s *SQLite) EnqueueTask(taskID, nodeKey, service, inputJSON string) (string, error)
- func (s *SQLite) ExtendLease(id string, owner string, ttlSec int64) error
- func (s *SQLite) FailQueueTask(queueID string) error
- func (s *SQLite) GetFlowVersionByFlowIDAndVersion(flowID string, version int) (store.FlowVersion, error)
- func (s *SQLite) GetFlowVersionByID(id string) (store.FlowVersion, error)
- func (s *SQLite) GetNodeRun(id string) (store.NodeRun, error)
- func (s *SQLite) GetTask(id string) (store.Task, error)
- func (s *SQLite) HeartbeatWorker(id string, url string, load int) error
- func (s *SQLite) Init() error
- func (s *SQLite) LatestPublishedVersion(flowID string) (store.FlowVersion, error)
- func (s *SQLite) LeaseNextTask(owner string, ttlSec int64) (store.Task, error)
- func (s *SQLite) ListFlowVersions(flowID string) ([]store.FlowVersion, error)
- func (s *SQLite) ListFlows(limit, offset int) ([]store.Flow, int64, error)
- func (s *SQLite) ListNodeRuns(taskID string) ([]store.NodeRun, error)
- func (s *SQLite) ListTasks(status string, flowVersionID string, limit, offset int) ([]store.Task, int64, error)
- func (s *SQLite) ListWorkers(service string, ttl int64) ([]store.WorkerInfo, error)
- func (s *SQLite) PollQueue(workerID string, services []string, timeoutSec int64) (store.QueueTask, error)
- func (s *SQLite) RefreshWorkersStatus(ttl int64) error
- func (s *SQLite) RegisterWorker(w store.WorkerInfo) error
- func (s *SQLite) SaveNodeRun(nr map[string]interface{}) error
- func (s *SQLite) UpdateNodeRun(id string, updates map[string]interface{}) error
- func (s *SQLite) UpdateTaskProgress(id string, currentNode string, lastAction string, sharedJSON string, ...) error
- func (s *SQLite) UpdateTaskProgressOwned(id string, owner string, currentNode string, lastAction string, ...) error
- func (s *SQLite) UpdateTaskStatus(id string, status string) error
- func (s *SQLite) UpdateTaskStatusOwned(id string, owner string, status string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLite ¶
SQLite implements the Store interface using a SQLite database.
func OpenSQLite ¶
OpenSQLite opens a connection to the SQLite database at the given path.
func (*SQLite) CompleteQueueTask ¶
CompleteQueueTask marks a queue task as completed (or failed) Note: The actual result/error is stored in node_runs via a separate call, or we could add result columns here. For now, we assume the engine will handle the result, but typically the worker reports result here. To keep it simple, we'll just mark status here, and let the caller handle the data persistence elsewhere or add columns if needed. Wait, the design says Worker calls /queue/complete with result. So we need to return the TaskID so the API can update the flow.
func (*SQLite) CreateFlow ¶
func (*SQLite) CreateFlowVersion ¶
func (*SQLite) CreateNodeRun ¶
func (*SQLite) CreateTask ¶
func (*SQLite) EnqueueTask ¶
EnqueueTask adds a new task to the queue
func (*SQLite) ExtendLease ¶
func (*SQLite) FailQueueTask ¶
FailQueueTask marks a queue task as failed
func (*SQLite) GetFlowVersionByFlowIDAndVersion ¶
func (*SQLite) GetFlowVersionByID ¶
func (s *SQLite) GetFlowVersionByID(id string) (store.FlowVersion, error)
func (*SQLite) HeartbeatWorker ¶
func (*SQLite) LatestPublishedVersion ¶
func (s *SQLite) LatestPublishedVersion(flowID string) (store.FlowVersion, error)
func (*SQLite) LeaseNextTask ¶
func (*SQLite) ListFlowVersions ¶
func (s *SQLite) ListFlowVersions(flowID string) ([]store.FlowVersion, error)
func (*SQLite) ListWorkers ¶
func (*SQLite) PollQueue ¶
func (s *SQLite) PollQueue(workerID string, services []string, timeoutSec int64) (store.QueueTask, error)
PollQueue attempts to claim a pending task for the given services
func (*SQLite) RefreshWorkersStatus ¶
func (*SQLite) RegisterWorker ¶
func (s *SQLite) RegisterWorker(w store.WorkerInfo) error
RegisterWorker registers or updates a worker in the database.