ark_random API
Purpose
Returns a random key from the key-value store.
Syntax
int ark_random(ark, kbuflen, klen, kbuf)
ARK * ark;
uint64_t kbuflen
int64_t *klen;
void * kbuf;
Description
The ark_random API returns a random key from the key-value store based on the ark handle in the kbuf buffer, and the size of the key in the klen parameter, while the key size (klen) is less than the kbuf size (kbuflen).
Parameters
- ark
- Specifies the handle that represents the key-value store.
- kbuflen
- Holds the size of the key-value store in bytes.
- klen
- Specifies the size of the key that is returned in the
kbufparameter. - kbuf
- Specifies the buffer to hold the key.
Return values
- 0
- Indicates successful completion.
- EINVAL
- Indicates failure because of an invalid parameter.