3 #include <launchdarkly/data/evaluation_reason.hpp>
4 #include <launchdarkly/server_side/integrations/big_segments/big_segment_store_types.hpp>
8 #include <unordered_map>
9 #include <unordered_set>
11 namespace launchdarkly::server_side::data_components {
12 class BigSegmentStoreWrapper;
15 namespace launchdarkly::server_side::evaluation {
22 Guard(std::unordered_set<std::string>& set, std::string key);
32 std::unordered_set<std::string>& set_;
33 std::string
const key_;
62 std::string prerequisite_key);
71 [[nodiscard]] std::optional<Guard>
NoticeSegment(std::string segment_key);
98 std::string
const& context_key)
const;
118 [[nodiscard]]
bool DidStoreError(std::string
const& context_key)
const;
121 std::unordered_set<std::string> prerequisites_seen_;
122 std::unordered_set<std::string> segments_seen_;
126 EvaluationReason::BigSegmentsStatus::kNone;
128 std::unordered_map<std::string, integrations::Membership> memberships_;
129 std::unordered_set<std::string> store_error_keys_;
BigSegmentsStatus
Definition: evaluation_reason.hpp:61
Internal layer between the evaluator and a customer-provided integrations::IBigSegmentStore.
Definition: big_segment_store_wrapper.hpp:44
Definition: evaluation_stack.hpp:45
void RecordBigSegmentsStatus(enum EvaluationReason::BigSegmentsStatus status)
Definition: evaluation_stack.cpp:61
void RecordStoreError(std::string context_key)
Definition: evaluation_stack.cpp:87
integrations::Membership const * FindMembership(std::string const &context_key) const
Definition: evaluation_stack.cpp:73
void StoreMembership(std::string context_key, integrations::Membership membership)
Definition: evaluation_stack.cpp:82
EvaluationStack(data_components::BigSegmentStoreWrapper *big_segment_store=nullptr)
Definition: evaluation_stack.cpp:27
data_components::BigSegmentStoreWrapper * BigSegmentStore() const
Definition: evaluation_stack.cpp:56
enum EvaluationReason::BigSegmentsStatus BigSegmentsStatus() const
Definition: evaluation_stack.cpp:69
std::optional< Guard > NoticePrerequisite(std::string prerequisite_key)
Definition: evaluation_stack.cpp:40
bool DidStoreError(std::string const &context_key) const
Definition: evaluation_stack.cpp:91
std::optional< Guard > NoticeSegment(std::string segment_key)
Definition: evaluation_stack.cpp:49
Membership describes which Big Segments a single context belongs to, as reported by an IBigSegmentSto...
Definition: big_segment_store_types.hpp:30
Definition: evaluation_stack.hpp:21