Skip to content

Commit 1e6b6b6

Browse files
authored
feat: support incremental window state (#3406)
Signed-off-by: Song Gao <[email protected]>
1 parent 8b9042a commit 1e6b6b6

File tree

3 files changed

+415
-79
lines changed

3 files changed

+415
-79
lines changed

internal/topo/context/default.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,15 @@ func (c *DefaultContext) GetCounter(key string) (int, error) {
291291
}
292292
}
293293

294+
func (c *DefaultContext) GetAllState() map[string]interface{} {
295+
m := make(map[string]interface{})
296+
c.state.Range(func(key, value interface{}) bool {
297+
m[key.(string)] = value
298+
return true
299+
})
300+
return m
301+
}
302+
294303
func (c *DefaultContext) PutState(key string, value interface{}) error {
295304
c.state.Store(key, value)
296305
return nil

0 commit comments

Comments
 (0)