Function wasmcloud_runtime::capability::wrpc::wrpc::keyvalue::store::list_keys

source ยท
pub fn list_keys<'a, C: Invoke>(
    wrpc__: &'a C,
    cx__: C::Context,
    bucket: &'a str,
    cursor: Option<u64>,
) -> impl Future<Output = Result<Result<KeyResponse, Error>>> + Send + 'a
Expand description

Get all the keys in the store with an optional cursor (for use in pagination). It returns a list of keys. Please note that for most KeyValue implementations, this is a can be a very expensive operation and so it should be used judiciously. Implementations can return any number of keys in a single response, but they should never attempt to send more data than is reasonable (i.e. on a small edge device, this may only be a few KB, while on a large machine this could be several MB). Any response should also return a cursor that can be used to fetch the next page of keys. See the key-response record for more information.

Note that the keys are not guaranteed to be returned in any particular order.

If the store is empty, it returns an empty list.

MAY show an out-of-date list of keys if there are concurrent writes to the store.

If any error occurs, it returns an Err(error).