diff options
| author | sangtran <tranquangsang12.7@gmail.com> | 2026-08-29 01:08:28 +0700 |
|---|---|---|
| committer | sangtran <tranquangsang12.7@gmail.com> | 2026-08-29 01:08:28 +0700 |
| commit | 96c07bab1086510a55a004e9a1b90c30bc723a5c (patch) | |
| tree | 7abbc615c51667e111fdef7b2ef69a9fc663f2ca /core/state.go | |
| signature | Verified sangtran <tranquangsang12.7@gmail.com> Key: 8DD79823D235E1BB ultimate trust | |
| download | flux-96c07bab1086510a55a004e9a1b90c30bc723a5c.tar.gz flux-96c07bab1086510a55a004e9a1b90c30bc723a5c.zip | |
Verified feat: init base draft support window
Diffstat (limited to 'core/state.go')
| -rw-r--r-- | core/state.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/state.go b/core/state.go new file mode 100644 index 0000000..d6d7847 --- /dev/null +++ b/core/state.go | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | package core | ||
| 2 | |||
| 3 | import "context" | ||
| 4 | |||
| 5 | // ValueState is for client side using to update state | ||
| 6 | type ValueState[T any] interface { | ||
| 7 | Value(ctx context.Context) (T, error) | ||
| 8 | Update(ctx context.Context, newVal T) (T, error) | ||
| 9 | Clear(ctx context.Context) error | ||
| 10 | } | ||
