wrpc-interface-keyvalue 0.13.0

wRPC keyvalue interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// This is based on `wasi:keyvalue`
package wrpc:keyvalue@0.1.0;

interface atomic {
    compare-and-swap: func(bucket: string, key: string, old: u64, new: u64) -> result<bool, string>;
    increment: func(bucket: string, key: string, delta: u64) -> result<u64, string>;
}

interface eventual {
    delete: func(bucket: string, key: string) -> result<_, string>;
    exists: func(bucket: string, key: string) -> result<bool, string>;
    get: func(bucket: string, key: string) -> result<option<stream<u8>>, string>;
    set: func(bucket: string, key: string, value: stream<u8>) -> result<_, string>;
}