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

Functions
KeyValue store status
Functions » KeyValue store

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

## 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.