aboutsummaryrefslogtreecommitdiff
path: root/core/state_backend.go
diff options
context:
space:
mode:
authorSangTran-127 <tranquangsang12.7@gmail.com>2026-08-09 01:11:31 +0700
committerSangTran-127 <tranquangsang12.7@gmail.com>2026-08-09 01:11:31 +0700
commit4d62f01af159fddd56585b3dce19b8a0f47369c1 (patch)
treeb7396fad1528edb048ef500d1894f78312df8233 /core/state_backend.go
parent0958e46c3651f2c8b6d76bcffbd8820063647d59 (diff)
downloadgoflink-4d62f01af159fddd56585b3dce19b8a0f47369c1.tar.gz
goflink-4d62f01af159fddd56585b3dce19b8a0f47369c1.zip
feat: implement memory state backend with key group assignment and value state interface
Diffstat (limited to 'core/state_backend.go')
-rw-r--r--core/state_backend.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/state_backend.go b/core/state_backend.go
new file mode 100644
index 0000000..219bb63
--- /dev/null
+++ b/core/state_backend.go
@@ -0,0 +1,13 @@
+package core
+
+import "context"
+
+type StateBackend interface {
+ // SetCurrentKey will perform in Memory
+ SetCurrentKey(key string) error
+ // GetCurrentKey will perform in Memory
+ GetCurrentKey() string
+
+ // GetValueState will perform in disk
+ GetValueState(ctx context.Context, key string) (ValueState[any], error)
+}