diff options
| author | sangtran <tranquangsang12.7@gmail.com> | 2026-08-29 01:08:28 +0700 |
|---|---|---|
| committer | sangtran <tranquangsang12.7@gmail.com> | 2026-08-29 01:08:28 +0700 |
| commit | 96c07bab1086510a55a004e9a1b90c30bc723a5c (patch) | |
| tree | 7abbc615c51667e111fdef7b2ef69a9fc663f2ca /core/operator/operator.go | |
| signature | Verified sangtran <tranquangsang12.7@gmail.com> Key: 8DD79823D235E1BB ultimate trust | |
| download | flux-96c07bab1086510a55a004e9a1b90c30bc723a5c.tar.gz flux-96c07bab1086510a55a004e9a1b90c30bc723a5c.zip | |
Verified feat: init base draft support window
Diffstat (limited to 'core/operator/operator.go')
| -rw-r--r-- | core/operator/operator.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/operator/operator.go b/core/operator/operator.go new file mode 100644 index 0000000..0c588e5 --- /dev/null +++ b/core/operator/operator.go | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | package operator | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "context" | ||
| 5 | "flux/core" | ||
| 6 | ) | ||
| 7 | |||
| 8 | type Emitter[OUT any] interface { | ||
| 9 | Emit(ctx context.Context, record core.StreamRecord[OUT]) error | ||
| 10 | } | ||
| 11 | |||
| 12 | type Operator[IN, OUT any] interface { | ||
| 13 | Open(ctx context.Context) error | ||
| 14 | Process(ctx context.Context, record core.StreamRecord[IN], out Emitter[OUT]) error | ||
| 15 | Close(ctx context.Context) error | ||
| 16 | } | ||
