KVStore

Classin kv_storecompute-sdk-cpp 0.7.0View source

Include fastly/kv_store.h to use this class.

Methods

build_erase

View source
EraseBuilder fastly::kv_store::KVStore::build_erase() const

Create a buildable erase request for the KV Store. When the desired configuration has been set, execute the erase and wait for the response.

Returns

build_insert

View source
InsertBuilder fastly::kv_store::KVStore::build_insert() const

Create a buildable insert request for the KV Store. When the desired configuration has been set, execute the insert and wait for the response.

Returns

build_list

View source
ListBuilder fastly::kv_store::KVStore::build_list() const

Create a buildable list request for the KV Store. When the desired configuration has been set, execute the list and wait for the response.

Returns

build_lookup

View source
LookupBuilder fastly::kv_store::KVStore::build_lookup() const

Returns

expected fastly::kv_store::KVStore::erase(std::string_view key) const

Erase a value in the KV Store.

Parameters

key: std::string_view

Returns

expected fastly::kv_store::KVStore::insert(std::string_view key, Body value) const

Insert a value into the KV Store.

If the store already contained a value for this key, it will be overwritten. Returns an error if the value cannot be inserted.

Parameters

key: std::string_view
value: Body

Returns

expected<ListPage> fastly::kv_store::KVStore::list() const

List keys in the KV Store.

Returns

expected<LookupResponse> fastly::kv_store::KVStore::lookup(std::string_view key) const

Parameters

key: std::string_view

Returns

open

staticView source
static expected<std::optional<KVStore>> fastly::kv_store::KVStore::open(std::string_view name)

Opens a key-value store with the given name.

Returns an error if the store cannot be opened.

Parameters

name: std::string_view

Returns

expected<std::optional<KVStore>>

pending_erase_wait

View source
expected fastly::kv_store::KVStore::pending_erase_wait(PendingEraseHandle pending_erase_handle) const

Erase a value in the KV Store.

Parameters

pending_erase_handle: PendingEraseHandle

Returns

pending_insert_wait

View source
expected fastly::kv_store::KVStore::pending_insert_wait(PendingInsertHandle pending_insert_handle) const

Insert a value in the KV Store.

Parameters

pending_insert_handle: PendingInsertHandle

Returns

pending_list_wait

View source
expected<ListPage> fastly::kv_store::KVStore::pending_list_wait(PendingListHandle pending_request_handle) const

Wait on a pending list operation.

Parameters

pending_request_handle: PendingListHandle

Returns

pending_lookup_wait

View source
expected<LookupResponse> fastly::kv_store::KVStore::pending_lookup_wait(PendingLookupHandle pending_request_handle) const

Look up a value in the KV Store.

Parameters

pending_request_handle: PendingLookupHandle

Returns