C++ Server-Side SDK
LaunchDarkly SDK
Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
launchdarkly::server_side::data_interfaces::FDv1FallbackDirective Struct Reference

#include <fdv2_source_result.hpp>

Static Public Member Functions

static std::optional< std::chrono::seconds > ParseTtl (std::string_view value)
 

Public Attributes

std::chrono::seconds ttl = kDefaultTtl
 

Static Public Attributes

static constexpr std::chrono::seconds kDefaultTtl = std::chrono::hours(1)
 

Detailed Description

Server-directed instruction to fall back to FDv1, carried alongside any FDv2 source result whose underlying transport observed it (e.g. an X-LD-FD-Fallback: true response header).

Member Function Documentation

◆ ParseTtl()

static std::optional<std::chrono::seconds> launchdarkly::server_side::data_interfaces::FDv1FallbackDirective::ParseTtl ( std::string_view  value)
inlinestatic

Parse the value of an X-LD-FD-Fallback-TTL header (or equivalent protocolFallbackTTL field from a goodbye message). Returns std::nullopt if the value is malformed.

Member Data Documentation

◆ kDefaultTtl

constexpr std::chrono::seconds launchdarkly::server_side::data_interfaces::FDv1FallbackDirective::kDefaultTtl = std::chrono::hours(1)
staticconstexpr

Default TTL used when the directive carries no TTL of its own.

◆ ttl

std::chrono::seconds launchdarkly::server_side::data_interfaces::FDv1FallbackDirective::ttl = kDefaultTtl

How long to stay on FDv1 before attempting to recover to FDv2. A value of 0 seconds means the SDK should remain on FDv1 indefinitely.


The documentation for this struct was generated from the following file: