aboutsummaryrefslogtreecommitdiff
path: root/core/operator.go
diff options
context:
space:
mode:
authorSangTran-127 <tranquangsang12.7@gmail.com>2026-08-08 12:54:43 +0700
committerSangTran-127 <tranquangsang12.7@gmail.com>2026-08-08 12:54:43 +0700
commitacc0b6fbaace61a3befd7f726f9d80fb69391126 (patch)
tree67a8ec8db2f0599cc2ae2a774c88c2cbf43da812 /core/operator.go
parent77a3b3e86b06504bdf37e35d83a192806a95a63e (diff)
downloadgoflink-acc0b6fbaace61a3befd7f726f9d80fb69391126.tar.gz
goflink-acc0b6fbaace61a3befd7f726f9d80fb69391126.zip
implement core transport and processing operators with receiver, emitter, filter, and map functionalities
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
+}