prf::net::pool::cfg namespace

Pool configuration schema and validation helpers used by runtime scenarios to open poolX config sections.

This namespace owns the persistent representation of one pool and translates it into a normalized Ipv4PoolStaticConfig consumed by Ipv4PoolManager.

Namespaces

namespace validators

Classes

struct Ipv4PoolStaticConfig
Normalized parsed configuration of one pool section.
struct PoolConfigSectionDefinition
Typed section definition for one poolX config section.
struct PoolSectionDefaults
Factory-default profile used to seed one named poolX section.

Typedefs

using PoolConfigSection = prf::config::TypedConfigSection<PoolConfigSectionDefinition>
Strongly typed config facade for one pool section.

Functions

auto default_pool_type() -> std::string
Default config value for type.
auto make_pool_section_schema(const std::string& section_name) -> prf::config::SectionSchema
Convenience helper mirroring PoolConfigSectionDefinition::schema.
auto parse_pool_config(const PoolConfigSection& section) -> std::optional<Ipv4PoolStaticConfig>
Parses and validates one typed pool section into normalized runtime config.
auto pool_config_is_valid(const PoolConfigSection& section) -> bool
Returns whether a typed pool section is currently valid.
auto pool_section_defaults(std::string_view section_name) -> PoolSectionDefaults
Returns factory defaults for one named pool section.
auto pool_snapshot_matches_static_config(const Ipv4PoolStaticConfig& config, const PoolSnapshot& snapshot) -> bool
Checks whether a static config and effective snapshot describe the same pool shape.
auto pool_source_snapshot_is_valid(const PoolSourceSnapshot& snapshot) -> bool
Validates a live dynamic source snapshot before it becomes an effective pool.

Typedef documentation

using prf::net::pool::cfg::PoolConfigSection = prf::config::TypedConfigSection<PoolConfigSectionDefinition>

Strongly typed config facade for one pool section.

Function documentation

std::string prf::net::pool::cfg::default_pool_type()

Default config value for type.

prf::config::SectionSchema prf::net::pool::cfg::make_pool_section_schema(const std::string& section_name)

Convenience helper mirroring PoolConfigSectionDefinition::schema.

std::optional<Ipv4PoolStaticConfig> prf::net::pool::cfg::parse_pool_config(const PoolConfigSection& section)

Parses and validates one typed pool section into normalized runtime config.

Parameters
section Typed pool section facade.
Returns Parsed config on success, std::nullopt when config is invalid.

Example:

auto section = prf::net::pool::cfg::PoolConfigSection(...);
auto parsed = prf::net::pool::cfg::parse_pool_config(section);
if (parsed && parsed->enabled) {
    // Safe to pass to pool runtime
}

bool prf::net::pool::cfg::pool_config_is_valid(const PoolConfigSection& section)

Returns whether a typed pool section is currently valid.

PoolSectionDefaults prf::net::pool::cfg::pool_section_defaults(std::string_view section_name)

Returns factory defaults for one named pool section.

Example:

auto defaults = prf::net::pool::cfg::pool_section_defaults("pool1");
// defaults.type == "dynamic", defaults.source_interface == "np2"

bool prf::net::pool::cfg::pool_snapshot_matches_static_config(const Ipv4PoolStaticConfig& config, const PoolSnapshot& snapshot)

Checks whether a static config and effective snapshot describe the same pool shape.

bool prf::net::pool::cfg::pool_source_snapshot_is_valid(const PoolSourceSnapshot& snapshot)

Validates a live dynamic source snapshot before it becomes an effective pool.