aboutsummaryrefslogtreecommitdiff
path: root/core/operator.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/operator.go')
-rw-r--r--core/operator.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/operator.go b/core/operator.go
new file mode 100644
index 0000000..40d0ca6
--- /dev/null
+++ b/core/operator.go
@@ -0,0 +1,11 @@
+package core
+
+type Emitter[OUT any] interface {
+ Emit(record StreamRecord[OUT]) error
+}
+
+type Operator[IN, OUT any] interface {
+ Open() error
+ Process(record StreamRecord[IN], out Emitter[OUT]) error
+ Close() error
+}