Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhojha committed Sep 4, 2024
1 parent 9f2371d commit ff1bbd5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/nats.h
Original file line number Diff line number Diff line change
Expand Up @@ -7172,6 +7172,28 @@ kvStore_WatchAll(kvWatcher **new_watcher, kvStore *kv, kvWatchOptions *opts);
NATS_EXTERN natsStatus
kvStore_Keys(kvKeysList *list, kvStore *kv, kvWatchOptions *opts);

/** \brief Returns all keys in the bucket which matches the list of subject like filters.
* Get a list of the keys in a bucket filtered by a
* subject-like string, for instance "key" or "key.foo.*" or "key.>"
* Any deleted or purged keys will not be returned.
*
* \note Use #kvWatchOptions.Timeout to specify how long to wait (in milliseconds)
* to gather all keys for this bucket. If the deadline is reached, this function
* will return #NATS_TIMEOUT and no keys.
*
* \warning The user should call #kvKeysList_Destroy to release memory allocated
* for the entries list.
*
* @see kvWatchOptions_Init
* @see kvKeysList_Destroy
* @see kvStore_WatchMulti
*
* @param list list the pointer to a #kvKeysList that will be initialized and filled with resulting key strings.
* @param kv the pointer to the #kvStore object.
* @param opts the history options, possibly `NULL`.
* @param filters the list of subject like string filters: Cannot be `NULL`
* @param numFilters number of filters: Cannot be 0
*/
NATS_EXTERN natsStatus
kvStore_KeysWithFilters(kvKeysList *list, kvStore *kv, kvWatchOptions *opts,char **filters,int numFilters);

Expand Down

0 comments on commit ff1bbd5

Please sign in to comment.