Skip to main content

ld_ctx

Function ld_ctx 

Source
fn ld_ctx(
    env_id: &EnvironmentId,
    build_info: &'static BuildInfo,
    cluster: Option<&ClusterScopeContext>,
    replica: Option<&ReplicaScopeContext>,
) -> Result<Context, Error>
Expand description

Builds a multi-context for evaluating scoped feature flags.

Composes the base contexts (environment + organization + build) with:

  • a cluster context for cluster-coherent (replica-free) resolution, and/or
  • a replica context for replica-local resolution.

The environment-wide pass passes None for both. This is the single entry point the sync loop uses to evaluate each scoped pass.