#include <all_flags_state.hpp>
AllFlagsState is a snapshot of the state of multiple feature flags with regard to a specific evaluation context.
Serializing this object to JSON using boost::json::value_from will produce the appropriate data structure for bootstrapping the LaunchDarkly JavaScript client.
To do this, the header <launchdarkly/server_side/serialization/json_all_flags_state.hpp> must be included to make the appropriate tag_invoke
implementations available to boost.
◆ Options
Enumerator |
---|
Default | Default behavior.
|
IncludeReasons | Include evaluation reasons in the state object. By default, they are not.
|
DetailsOnlyForTrackedFlags | Include detailed flag metadata only for flags with event tracking or debugging turned on.
This reduces the size of the JSON data if you are passing the flag state to the front end.
|
ClientSideOnly | Include only flags marked for use with the client-side SDK. By default, all flags are included.
|
◆ AllFlagsState() [1/2]
launchdarkly::server_side::AllFlagsState::AllFlagsState |
( |
| ) |
|
◆ AllFlagsState() [2/2]
launchdarkly::server_side::AllFlagsState::AllFlagsState |
( |
std::unordered_map< std::string, Value > |
evaluations, |
|
|
std::unordered_map< std::string, class State > |
flags_state |
|
) |
| |
Constructs a valid instance of AllFlagsState.
- Parameters
-
evaluations | A map of evaluation results for each flag. |
flags_state | A map of metadata for each flag. |
◆ States()
std::unordered_map< std::string, AllFlagsState::State > const & launchdarkly::server_side::AllFlagsState::States |
( |
| ) |
const |
- Returns
- A map of metadata for each flag.
◆ Valid()
bool launchdarkly::server_side::AllFlagsState::Valid |
( |
| ) |
const |
- Returns
- True if the call to AllFlagsState succeeded. False if there was an error, such as the data store being unavailable. When false, the other accessors will return empty maps.
◆ Values()
std::unordered_map< std::string, Value > const & launchdarkly::server_side::AllFlagsState::Values |
( |
| ) |
const |
- Returns
- A map of evaluation results for each flag.
The documentation for this class was generated from the following files: