diff options
| author | SangTran-127 <tranquangsang12.7@gmail.com> | 2026-08-08 17:24:01 +0700 |
|---|---|---|
| committer | SangTran-127 <tranquangsang12.7@gmail.com> | 2026-08-08 17:24:01 +0700 |
| commit | 0958e46c3651f2c8b6d76bcffbd8820063647d59 (patch) | |
| tree | 1e917ed409eddc0b3c29fd602e551778c96c8dc6 /core/record.go | |
| parent | acc0b6fbaace61a3befd7f726f9d80fb69391126 (diff) | |
| download | goflink-0958e46c3651f2c8b6d76bcffbd8820063647d59.tar.gz goflink-0958e46c3651f2c8b6d76bcffbd8820063647d59.zip | |
refactor: add context support to transport operators and runtime task management
Diffstat (limited to 'core/record.go')
| -rw-r--r-- | core/record.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/record.go b/core/record.go index cb160b2..e18e58d 100644 --- a/core/record.go +++ b/core/record.go @@ -16,8 +16,8 @@ type StreamRecord[T any] struct { Type RecordType } -func NewDataRecord[T any](key string, val T, timestamp int64) *StreamRecord[T] { - return &StreamRecord[T]{ +func NewDataRecord[T any](key string, val T, timestamp int64) StreamRecord[T] { + return StreamRecord[T]{ Value: val, Key: key, Timestamp: timestamp, @@ -25,15 +25,15 @@ func NewDataRecord[T any](key string, val T, timestamp int64) *StreamRecord[T] { } } -func NewWatermarkRecord[T any](timestamp int64) *StreamRecord[T] { - return &StreamRecord[T]{ +func NewWatermarkRecord[T any](timestamp int64) StreamRecord[T] { + return StreamRecord[T]{ Type: RecordWatermark, Timestamp: timestamp, } } -func NewBarrierRecord[T any](barrierID uint64) *StreamRecord[T] { - return &StreamRecord[T]{ +func NewBarrierRecord[T any](barrierID uint64) StreamRecord[T] { + return StreamRecord[T]{ Type: RecordBarrier, BarrierID: barrierID, } |