|
7 | 7 | #include "attribute_reference.hpp"
|
8 | 8 | namespace launchdarkly::config::detail {
|
9 | 9 |
|
| 10 | +/** |
| 11 | + * Specifies the security regime for event delivery. |
| 12 | + */ |
10 | 13 | enum class TransportSecurity {
|
| 14 | + // Plaintext event delivery. |
11 | 15 | None = 0,
|
| 16 | + // Event delivery secured by Transport Layer Security. |
12 | 17 | TLS = 1,
|
13 | 18 | };
|
14 | 19 |
|
15 | 20 | struct Events {
|
16 | 21 | public:
|
17 | 22 | template <typename SDK>
|
18 | 23 | friend class EventsBuilder;
|
| 24 | + /** |
| 25 | + * Constructs configuration for the event subsystem. |
| 26 | + * @param capacity How many events can queue in memory before new events |
| 27 | + * are dropped. |
| 28 | + * @param flush_interval How often events are automatically flushed to LaunchDarkly. |
| 29 | + * @param path The path component of the LaunchDarkly event delivery endpoint. |
| 30 | + * @param all_attributes_private Whether all attributes should be treated as private or not. |
| 31 | + * @param private_attrs Which attributes should be treated as private, if all_attributes_private is false. |
| 32 | + * @param security Whether a plaintext or encrypted client should be used for event delivery. |
| 33 | + */ |
19 | 34 | Events(std::size_t capacity,
|
20 | 35 | std::chrono::milliseconds flush_interval,
|
21 | 36 | std::string path,
|
22 | 37 | bool all_attributes_private,
|
23 | 38 | AttributeReference::SetType private_attrs,
|
24 | 39 | TransportSecurity security);
|
25 |
| - std::size_t capacity() const; |
26 |
| - std::chrono::milliseconds flush_interval() const; |
27 |
| - std::string const& path() const; |
28 |
| - bool all_attributes_private() const; |
29 |
| - AttributeReference::SetType const& private_attributes() const; |
30 |
| - TransportSecurity transport_security() const; |
| 40 | + |
| 41 | + /** |
| 42 | + * Capacity of the event processor. |
| 43 | + */ |
| 44 | + [[nodiscard]] std::size_t capacity() const; |
| 45 | + |
| 46 | + /** |
| 47 | + * Flush interval of the event processor, in milliseconds. |
| 48 | + */ |
| 49 | + [[nodiscard]] std::chrono::milliseconds flush_interval() const; |
| 50 | + |
| 51 | + /** |
| 52 | + * Path component of the LaunchDarkly event delivery endpoint. |
| 53 | + */ |
| 54 | + [[nodiscard]] std::string const& path() const; |
| 55 | + |
| 56 | + /** |
| 57 | + * Whether all attributes should be considered private or not. |
| 58 | + */ |
| 59 | + [[nodiscard]] bool all_attributes_private() const; |
| 60 | + |
| 61 | + /** |
| 62 | + * Set of individual attributes that should be considered private. |
| 63 | + */ |
| 64 | + [[nodiscard]] AttributeReference::SetType const& private_attributes() const; |
| 65 | + |
| 66 | + /** |
| 67 | + * Requested transport security. |
| 68 | + */ |
| 69 | + [[nodiscard]] TransportSecurity transport_security() const; |
31 | 70 |
|
32 | 71 | private:
|
33 | 72 | std::size_t capacity_;
|
34 | 73 | std::chrono::milliseconds flush_interval_;
|
35 | 74 | std::string path_;
|
36 | 75 | bool all_attributes_private_;
|
37 | 76 | AttributeReference::SetType private_attributes_;
|
38 |
| - |
39 | 77 | TransportSecurity transport_security_;
|
40 | 78 | };
|
41 | 79 |
|
|
0 commit comments