C++ Server-Side SDK
LaunchDarkly SDK
|
#include <iserialized_data_reader.hpp>
Classes | |
struct | Error |
Public Types | |
using | GetResult = tl::expected< std::optional< SerializedItemDescriptor >, Error > |
using | AllResult = tl::expected< std::unordered_map< std::string, SerializedItemDescriptor >, Error > |
Public Member Functions | |
ISerializedDataReader (ISerializedDataReader const &item)=delete | |
ISerializedDataReader (ISerializedDataReader &&item)=delete | |
ISerializedDataReader & | operator= (ISerializedDataReader const &)=delete |
ISerializedDataReader & | operator= (ISerializedDataReader &&)=delete |
virtual GetResult | Get (ISerializedItemKind const &kind, std::string const &itemKey) const =0 |
virtual AllResult | All (ISerializedItemKind const &kind) const =0 |
virtual std::string const & | Identity () const =0 |
virtual bool | Initialized () const =0 |
Interface for a data reader that provides feature flags and related data in a serialized form.
This interface should be used for database integrations, or any other data source implementation that retrieves data from some external service.
The SDK will take care of converting between its own internal data model and a serialized string form; the source interacts only with the serialized form.
The SDK will also provide its own caching layer in front of this source; this source should not provide caching, but simply do every query or update that the SDK tells it to do.
Implementations must be thread-safe.
|
pure virtual |
Retrieves all items from the specified collection.
If the store contains placeholders for deleted items, it should include them in the results, not filter them out.
kind | The kind of data to get. |
|
pure virtual |
Retrieves an item from the specified collection, if available.
kind | The kind of the item. |
itemKey | The key for the item. |
|
pure virtual |
|
pure virtual |