NATS C Client with JetStream and Streaming support
3.9.1
The nats.io C Client, Supported by Synadia Communications Inc.
|
Functions | |
NATS_EXTERN natsStatus | kvConfig_Init (kvConfig *cfg) |
Initializes a KeyValue configuration structure. More... | |
NATS_EXTERN natsStatus | js_CreateKeyValue (kvStore **new_kv, jsCtx *js, kvConfig *cfg) |
Creates a KeyValue store with a given configuration. More... | |
NATS_EXTERN natsStatus | js_KeyValue (kvStore **new_kv, jsCtx *js, const char *bucket) |
Looks-up and binds to an existing KeyValue store. More... | |
NATS_EXTERN natsStatus | js_DeleteKeyValue (jsCtx *js, const char *bucket) |
Deletes a KeyValue store. More... | |
NATS_EXTERN void | kvStore_Destroy (kvStore *kv) |
Destroys a KeyValue store object. More... | |
These functions allow to create, get or delete a KeyValue store.
NATS_EXTERN natsStatus kvConfig_Init | ( | kvConfig * | cfg | ) |
Use this before setting specific kvConfig options and passing it to js_CreateKeyValue.
cfg | the pointer to the stack variable kvConfig to initialize. |
NATS_EXTERN natsStatus js_CreateKeyValue | ( | kvStore ** | new_kv, |
jsCtx * | js, | ||
kvConfig * | cfg | ||
) |
Creates a KeyValue store with a given configuration.
Bucket names are restricted to this set of characters: A-Z
, a-z
, 0-9
, _
and -
.
NATS_EXTERN natsStatus js_KeyValue | ( | kvStore ** | new_kv, |
jsCtx * | js, | ||
const char * | bucket | ||
) |
This call is when the user wants to use an existing KeyValue store. If the store does not already exists, an error is returned.
Bucket names are restricted to this set of characters: A-Z
, a-z
, 0-9
, _
and -
.
NATS_EXTERN natsStatus js_DeleteKeyValue | ( | jsCtx * | js, |
const char * | bucket | ||
) |
This will delete the KeyValue store with the bucket
name.
Bucket names are restricted to this set of characters: A-Z
, a-z
, 0-9
, _
and -
.
js | the pointer to the jsCtx object. |
bucket | the name of the bucket of the existing KeyValue store. |
NATS_EXTERN void kvStore_Destroy | ( | kvStore * | kv | ) |