Skip to content

Commit

Permalink
cachedb: document return values of get_counter()
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Dec 18, 2020
1 parent dd1446b commit ef9ab05
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cachedb/cachedb.h
Expand Up @@ -60,6 +60,14 @@ typedef struct cachedb_funcs_t {
/* NOTE: "val->s" shall be allocated in PKG memory,
* and MUST be freed by the calling layer! */
int (*get) (cachedb_con *con, str *attr, str *val);

/**
* Gets the value of a counter.
* Return values:
* -2: key does not exist
* -1: internal error
* 0: key found and value returned in the `val` parameter
*/
int (*get_counter) (cachedb_con *con, str *attr, int *val);
int (*set) (cachedb_con *con, str *attr, str *val, int expires);
int (*remove) (cachedb_con *con, str *attr);
Expand Down

0 comments on commit ef9ab05

Please sign in to comment.