NATS C Client with JetStream and Streaming support 3.6.1 The nats.io C Client, Supported by Synadia Communications Inc.

Loading...
Searching...
No Matches
Functions
KeyValue store status
Functions » KeyValue store

## Functions
NATS_EXTERN const char * | kvStatus_Bucket (kvStatus *sts)
| Returns the bucket name.
NATS_EXTERN uint64_t | kvStatus_Values (kvStatus *sts)
| Returns how many messages are in the bucket, including historical values.
NATS_EXTERN int64_t | kvStatus_History (kvStatus *sts)
| Returns the configured history kept per key.
NATS_EXTERN int64_t | kvStatus_TTL (kvStatus *sts)
| Returns how long the bucket keeps values for.
NATS_EXTERN int64_t | kvStatus_Replicas (kvStatus *sts)
| Returns the number of replicas to keep for a bucket.
NATS_EXTERN uint64_t | kvStatus_Bytes (kvStatus *sts)
| Returns the size (in bytes) of this bucket.
NATS_EXTERN void | kvStatus_Destroy (kvStatus *sts)
| Destroys the KeyValue status object.

## Detailed Description

These functions allow to inspect the status of a bucket.

Warning
  EXPERIMENTAL FEATURE! We reserve the right to change the API without necessarily bumping the major version of the library.

## Function Documentation

## ◆ kvStatus_Bucket()

NATS_EXTERN const char * kvStatus_Bucket | ( | kvStatus * | sts | ) |

Returns the bucket name, or `NULL` if `sts` itself is `NULL`.

Parameters

  sts | the pointer to the kvStatus object.

## ◆ kvStatus_Values()

NATS_EXTERN uint64_t kvStatus_Values | ( | kvStatus * | sts | ) |

Returns how many messages are in the bucket, including historical values, or `0` if `sts` itself is `NULL`.

Parameters

  sts | the pointer to the kvStatus object.

## ◆ kvStatus_History()

NATS_EXTERN int64_t kvStatus_History | ( | kvStatus * | sts | ) |

Returns the configured history kept per key, or `0` if `sts` itself is `NULL`.

Parameters

  sts | the pointer to the kvStatus object.

## ◆ kvStatus_TTL()

NATS_EXTERN int64_t kvStatus_TTL | ( | kvStatus * | sts | ) |

Returns how long the bucket keeps values for, or `0` if `sts` itself is `NULL`.

Parameters

  sts | the pointer to the kvStatus object.

## ◆ kvStatus_Replicas()

NATS_EXTERN int64_t kvStatus_Replicas | ( | kvStatus * | sts | ) |

Returns the number of replicas to keep for a bucket, or `0` if `sts` itself is `NULL`.

Parameters

  sts | the pointer to the kvStatus object.

## ◆ kvStatus_Bytes()

NATS_EXTERN uint64_t kvStatus_Bytes | ( | kvStatus * | sts | ) |

Returns the size (in bytes) of this bucket, or `0` if `sts` itself is `NULL`.

Parameters

  sts | the pointer to the kvStatus object.

## ◆ kvStatus_Destroy()

NATS_EXTERN void kvStatus_Destroy | ( | kvStatus * | sts | ) |

Releases memory allocated for this kvStatus object.

Parameters

  sts | the pointer to the kvStatus object.