Skip to content

Commit a94dc62

Browse files
committed
Collapses Task sub-interfaces into Task
1 parent 2ada8cf commit a94dc62

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

internal/workflow/task.go

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ type TaskId string
1313
type Task interface {
1414
types.Comparable
1515
Display
16-
HasOutput
17-
HasNext
16+
AddOutput(workflow *Workflow, taskId TaskId) error
17+
GetNodeType() TaskType
18+
GetNext() []TaskId
1819
Width() int
19-
HasNodeType
2020
}
2121

2222
type Display interface {
@@ -25,20 +25,6 @@ type Display interface {
2525
Name() string
2626
}
2727

28-
type HasOutput interface {
29-
// AddOutput adds a result task, if compatible. For some task can be called multiple times
30-
AddOutput(workflow *Workflow, taskId TaskId) error
31-
}
32-
33-
// TODO: GetNext() should be differentiated for the case of single vs multiple successor nodes
34-
type HasNext interface {
35-
GetNext() []TaskId
36-
}
37-
38-
type HasNodeType interface {
39-
GetNodeType() TaskType
40-
}
41-
4228
func Equals[D Task](d1 D, d2 D) bool {
4329
return d1.Equals(d2)
4430
}

0 commit comments

Comments
 (0)