An opaque client object.
More...
#include <store.h>
|
void * | context |
| Used to store implementation specific data.
|
|
LDBoolean(* | init )(void *const context, const struct LDStoreCollectionState *collections, const unsigned int collectionCount) |
| Initialize the feature store with a new data set. More...
|
|
LDBoolean(* | get )(void *const context, const char *const kind, const char *const featureKey, struct LDStoreCollectionItem *const result) |
| Fetch a feature from the store. More...
|
|
LDBoolean(* | all )(void *const context, const char *const kind, struct LDStoreCollectionItem **const result, unsigned int *const resultCount) |
| Fetch all features in a given namespace. More...
|
|
LDBoolean(* | upsert )(void *const context, const char *const kind, const struct LDStoreCollectionItem *const feature, const char *const featureKey) |
| Replace an existing feature with a newer one or delete a feature. More...
|
|
LDBoolean(* | initialized )(void *const context) |
| Determine if the store is initialized with features yet. More...
|
|
void(* | destructor )(void *const context) |
| Destroy the implementation specific context associated. More...
|
|
◆ all
LDBoolean(* LDStoreInterface::all) (void *const context, const char *const kind, struct LDStoreCollectionItem **const result, unsigned int *const resultCount) |
Fetch all features in a given namespace.
- Parameters
-
[in] | context | Implementation specific context. May not be NULL (assert). |
[in] | kind | The namespace to search in. May not be NULL (assert). |
[out] | result | Returns an array of raw items. |
[out] | result | Count Returns the number of items in the result array. |
- Returns
- True on success, False on failure.
◆ destructor
void(* LDStoreInterface::destructor) (void *const context) |
Destroy the implementation specific context associated.
- Parameters
-
[in] | context | Implementation specific context. May not be NULL (assert). |
- Returns
- Void.
◆ get
LDBoolean(* LDStoreInterface::get) (void *const context, const char *const kind, const char *const featureKey, struct LDStoreCollectionItem *const result) |
Fetch a feature from the store.
- Parameters
-
[in] | context | Implementation specific context. May not be NULL (assert). |
[in] | kind | The namespace to search in. May not be NULL (assert). |
[in] | featureKey | The key to return the value for. May not be NULL (assert). |
[out] | result | Returns the feature, or NULL if it does not exist. |
- Returns
- True on success, False on failure.
◆ init
Initialize the feature store with a new data set.
- Parameters
-
[in] | context | Implementation specific context. |
[in] | collections | An array of namespaces of store items. |
[in] | collectionCount | The number of items in the array. |
- Returns
- True on success, False on failure.
◆ initialized
LDBoolean(* LDStoreInterface::initialized) (void *const context) |
Determine if the store is initialized with features yet.
- Parameters
-
[in] | context | Implementation specific context. May not be NULL (assert). |
- Returns
- True if the store is initialized, false otherwise.
◆ upsert
LDBoolean(* LDStoreInterface::upsert) (void *const context, const char *const kind, const struct LDStoreCollectionItem *const feature, const char *const featureKey) |
Replace an existing feature with a newer one or delete a feature.
- Parameters
-
[in] | context | Implementation specific context. May not be NULL (assert). |
[in] | kind | The namespace to search in. May not be NULL (assert). |
[in] | feature | The updated feature. Only deletes current if version is newer. This is also used to delete a feature. May not be NULL (assert). |
[in] | featureKey | Key of the new item. |
- Returns
- True on success, False on failure.
The documentation for this struct was generated from the following file: