Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat(gh-ost): task dag api definition (#1037)

p0ny22bb27600656
diff --git a/api/task_dag.go b/api/task_dag.go
new file mode 100644
index 0000000000..2b03c4d2a8
--- /dev/null
+++ b/api/task_dag.go
@@ -0,0 +1,29 @@
+package api
+
+// TaskDAG describes task dependency relationship.
+// FromTaskID is blocked by ToTaskID
+// It's rather DAGEdge than DAG
+type TaskDAG struct {
+ ID int
+
+ // Standard fields
+ CreatedTs int64
+ UpdatedTs int64
+
+ // Domain Specific fields
+ FromTaskID int
+ ToTaskID int
+ Payload string
+}
+
+// TaskDAGCreate is the API message to create TaskDAG.
+type TaskDAGCreate struct {
+ FromTaskID int
+ ToTaskID int
+ Payload string
+}
+
+// TaskDAGFind is the API message to find TaskDAG.
+type TaskDAGFind struct {
+ FromTaskID int
+}