aboutsummaryrefslogtreecommitdiff
path: root/state/memory_backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'state/memory_backend.go')
-rw-r--r--state/memory_backend.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/state/memory_backend.go b/state/memory_backend.go
index 58e86e0..8e37a8d 100644
--- a/state/memory_backend.go
+++ b/state/memory_backend.go
@@ -36,6 +36,11 @@ func (ms *MemoryStateBackend) SetCurrentKey(key string) error {
}
func (ms *MemoryStateBackend) GetValueState(ctx context.Context, key string) (core.ValueState[any], error) {
- //TODO implement me
- panic("implement me")
+ // Assign if state not existed
+
+ if _, ok := ms.states[key]; !ok {
+ ms.states[key] = make(map[int]map[string]any)
+ }
+
+ return &memoryStateValue{backend: ms, stateName: key}, nil
}