|
C++ Server-Side SDK
LaunchDarkly SDK
|
#include <hook.hpp>
Public Member Functions | |
| EvaluationSeriesDataBuilder (EvaluationSeriesData const &data) | |
| EvaluationSeriesDataBuilder () | |
| EvaluationSeriesDataBuilder & | Set (std::string key, Value value) |
| EvaluationSeriesDataBuilder & | SetShared (std::string key, std::shared_ptr< std::any > value) |
| EvaluationSeriesData | Build () const |
Builder for creating evaluation series data. Allows hook stages to add data to be passed to subsequent stages.
|
explicit |
Creates a new builder from existing data.
| data | The existing data to copy. |
|
default |
Creates a new empty builder.
| EvaluationSeriesData launchdarkly::server_side::hooks::EvaluationSeriesDataBuilder::Build | ( | ) | const |
Builds the immutable series data.
| EvaluationSeriesDataBuilder & launchdarkly::server_side::hooks::EvaluationSeriesDataBuilder::Set | ( | std::string | key, |
| Value | value | ||
| ) |
Sets a Value in the series data.
| key | The key to set. |
| value | The value to associate with the key. |
| EvaluationSeriesDataBuilder & launchdarkly::server_side::hooks::EvaluationSeriesDataBuilder::SetShared | ( | std::string | key, |
| std::shared_ptr< std::any > | value | ||
| ) |
Sets a shared_ptr to any type in the series data.
Use this for storing arbitrary objects like OpenTelemetry spans that need to be passed from beforeEvaluation to afterEvaluation.
Example:
| key | The key to set. |
| value | The shared_ptr to associate with the key. |