C++ Server-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
lazy_load_builder.hpp
1#pragma once
2
3#include <launchdarkly/server_side/config/built/data_system/lazy_load_config.hpp>
4#include <launchdarkly/server_side/integrations/data_reader/iserialized_data_reader.hpp>
5
6#include <launchdarkly/error.hpp>
7
8#include <chrono>
9#include <memory>
10
11namespace launchdarkly::server_side::config::builders {
12
28 using SourcePtr = std::shared_ptr<integrations::ISerializedDataReader>;
34
41 LazyLoadBuilder& Source(SourcePtr source);
42
50 LazyLoadBuilder& CacheRefresh(std::chrono::milliseconds ttl);
51
60
61 [[nodiscard]] tl::expected<built::LazyLoadConfig, Error> Build() const;
62
63 private:
65};
66
67} // namespace launchdarkly::server_side::config::builders
LazyLoadBuilder allows for specifying the configuration of the Lazy Load data system,...
Definition lazy_load_builder.hpp:27
LazyLoadBuilder & CacheRefresh(std::chrono::milliseconds ttl)
Specify the duration data items should live in-memory before requiring a refresh via the database....
Definition lazy_load_builder.cpp:9
LazyLoadBuilder & Source(SourcePtr source)
Specify the source of the data.
Definition lazy_load_builder.cpp:20
LazyLoadBuilder()
Constructs a new LazyLoadBuilder.
Definition lazy_load_builder.cpp:7
LazyLoadBuilder & CacheEviction(EvictionPolicy policy)
Specify the eviction policy when a data item's TTL expires. At this time, only EvictionPolicy::Disabl...
Definition lazy_load_builder.cpp:15
EvictionPolicy
Specifies the action taken when a data item's TTL expires.
Definition lazy_load_config.hpp:17