We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c165e3d commit b893772Copy full SHA for b893772
api/keyvalue/store.go
@@ -24,7 +24,16 @@ import (
24
v1 "github.com/nitrictech/nitric/core/pkg/proto/kvstore/v1"
25
)
26
27
-type ScanKeysOption = func(*v1.KvStoreScanKeysRequest)
+type ScanKeysRequest = v1.KvStoreScanKeysRequest
28
+
29
+type ScanKeysOption = func(*ScanKeysRequest)
30
31
+// Apply a prefix to the scan keys request
32
+func WithPrefix(prefix string) ScanKeysOption {
33
+ return func(req *ScanKeysRequest) {
34
+ req.Prefix = prefix
35
+ }
36
+}
37
38
// TODO: maybe move keystream to separate file
39
type KeyStream struct {
0 commit comments