Cloudflare - v1.3.0
    Preparing search index...

    Interface FlagshipSettings

    Settings for a Flagship feature-flag binding.

    The binding name, plus an evaluation context every call inherits. The app the binding points at is named by app_id in wrangler.json rather than here — a Worker reading two apps declares two bindings, and constructs one accessor per binding.

    Nothing about a flag's value is configurable here, deliberately. A default belongs at the call site, where the code that would use the flag is the code that knows what to do without it.

    1.3.0

    interface FlagshipSettings {
        binding: string;
        context?: FlagshipEvaluationContext;
    }

    Hierarchy (View Summary)

    Index
    binding: string

    Name of the binding as declared in wrangler.json.

    context?: FlagshipEvaluationContext

    Attributes merged into every evaluation this accessor performs.

    The deployment-wide half of a targeting rule — the service name, the environment, the region — as opposed to the per-request half a call supplies, such as a user or a symbol. A call's own context wins on any key it repeats.

    Configuring it here is what stops every call site from restating the same two attributes, and what makes "enable this for staging only" a rule written once against a value the deployment already knows.