C++ Server-Side SDK
LaunchDarkly SDK
|
#include <events_builder.hpp>
Public Member Functions | |
EventsBuilder () | |
EventsBuilder & | Enabled (bool enabled) |
EventsBuilder & | Disable () |
EventsBuilder & | Capacity (std::size_t capacity) |
EventsBuilder & | FlushInterval (std::chrono::milliseconds interval) |
EventsBuilder & | AllAttributesPrivate (bool all_attributes_private) |
EventsBuilder & | PrivateAttributes (AttributeReference::SetType private_attrs) |
EventsBuilder & | PrivateAttribute (AttributeReference attribute) |
EventsBuilder & | ContextKeysCapacity (std::size_t capacity) |
Specifies the number of unique context keys that can be remembered by the index event generation logic before needing to evict keys from memory in LRU order. More... | |
tl::expected< built::Events, Error > | Build () const |
Friends | |
bool | operator== (EventsBuilder< SDK > const &lhs, EventsBuilder< SDK > const &rhs) |
EventsBuilder allows for specification of parameters related to the SDK's event processor.
launchdarkly::config::shared::builders::EventsBuilder< SDK >::EventsBuilder |
Constructs an EventsBuilder.
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::AllAttributesPrivate | ( | bool | all_attributes_private | ) |
Attribute privacy indicates whether or not attributes should be retained by LaunchDarkly after being sent upon initialization, and if attributes should later be sent in events.
Attribute privacy may be specified in 3 ways:
(1) To specify that all attributes should be considered private - not just those designated private on a per-context basis - call this method with true as the parameter.
(2) To specify that a specific set of attributes should be considered private - in addition to those designated private on a per-context basis
(3) To specify private attributes on a per-context basis, it is not necessary to call either of these methods, as the default behavior is to treat all attributes as non-private unless otherwise specified.
all_attributes_private | True for behavior of (1), false for default behavior of (2) or (3). |
tl::expected< built::Events, Error > launchdarkly::config::shared::builders::EventsBuilder< SDK >::Build |
Builds Events configuration, if the configuration is valid.
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::Capacity | ( | std::size_t | capacity | ) |
Sets the capacity of the event processor. When more events are generated within the processor's flush interval than this value, events will be dropped.
capacity | Event queue capacity. |
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::ContextKeysCapacity | ( | std::size_t | capacity | ) |
Specifies the number of unique context keys that can be remembered by the index event generation logic before needing to evict keys from memory in LRU order.
After reaching capacity, it's possible that a previously-indexed context may cause generation of a redundant index event.
capacity | Maximum unique context keys to remember. |
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::Disable |
Alias for Enabled(false).
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::Enabled | ( | bool | enabled | ) |
Specify if event-sending should be enabled or not. By default, events are enabled.
enabled | True to enable. |
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::FlushInterval | ( | std::chrono::milliseconds | interval | ) |
Sets the flush interval of the event processor. The processor queues outgoing events based on the capacity parameter; these events are then delivered based on the flush interval.
interval | Interval between automatic flushes. |
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::PrivateAttribute | ( | AttributeReference | attribute | ) |
Specifies a single private attribute. May be called multiple times with additional private attributes.
attribute | Attribute to mark private. |
EventsBuilder< SDK > & launchdarkly::config::shared::builders::EventsBuilder< SDK >::PrivateAttributes | ( | AttributeReference::SetType | private_attrs | ) |
Specify a set of private attributes. Any existing private attributes are overwritten.