C++ Server-Side SDK
LaunchDarkly SDK
lazy_load_builder.h
Go to the documentation of this file.
1 
2 // NOLINTBEGIN modernize-use-using
3 
4 #pragma once
5 
7 
8 #include <stdbool.h>
9 #include <stddef.h>
10 
11 #ifdef __cplusplus
12 extern "C" { // only need to export C interface if
13 // used by C++ source code
14 #endif
15 
16 typedef struct _LDServerLazyLoadBuilder* LDServerLazyLoadBuilder;
17 
18 typedef struct _LDServerLazyLoadSourcePtr* LDServerLazyLoadSourcePtr;
19 
28  /* No action taken; cache eviction is disabled. Stale items will be used
29  * in evaluations if they cannot be refreshed. */
30  LD_LAZYLOAD_CACHE_EVICTION_POLICY_DISABLED = 0
31 };
32 
48 LD_EXPORT(LDServerLazyLoadBuilder)
50 
56 LD_EXPORT(void)
57 LDServerLazyLoadBuilder_Free(LDServerLazyLoadBuilder b);
58 
67 LD_EXPORT(void)
68 LDServerLazyLoadBuilder_SourcePtr(LDServerLazyLoadBuilder b,
69  LDServerLazyLoadSourcePtr source);
70 
78 LD_EXPORT(void)
79 LDServerLazyLoadBuilder_CacheRefreshMs(LDServerLazyLoadBuilder b,
80  unsigned int milliseconds);
81 
90 LD_EXPORT(void)
91 LDServerLazyLoadBuilder_CachePolicy(LDServerLazyLoadBuilder b,
92  enum LDLazyLoadCacheEvictionPolicy policy);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 // NOLINTEND modernize-use-using
Export macros for C bindings.
LDServerLazyLoadBuilder_New()
Definition: builder.cpp:290
LDServerLazyLoadBuilder_SourcePtr(LDServerLazyLoadBuilder b, LDServerLazyLoadSourcePtr source)
Definition: builder.cpp:300
LDServerLazyLoadBuilder_CachePolicy(LDServerLazyLoadBuilder b, enum LDLazyLoadCacheEvictionPolicy policy)
Specify the eviction policy when a data item's TTL expires. At this time, only LD_LAZYLOAD_CACHE_EVIC...
Definition: builder.cpp:321
LDServerLazyLoadBuilder_Free(LDServerLazyLoadBuilder b)
Frees the memory associated with a Lazy Load builder. Do not call if the builder was consumed by the ...
Definition: builder.cpp:295
LDLazyLoadCacheEvictionPolicy
Specifies the action taken when a data item within the in-memory cache expires.
Definition: lazy_load_builder.h:27
LDServerLazyLoadBuilder_CacheRefreshMs(LDServerLazyLoadBuilder b, unsigned int milliseconds)
Specify the duration data items should live in-memory before requiring a refresh via the database....
Definition: builder.cpp:313