pub struct VersionPointer {
pub surface: SurfaceKey,
pub active: Option<CandidateId>,
pub canary: Option<CanaryBinding>,
}Expand description
The active version of one production surface: an immutable-pointer move away from any version that ever served.
Two slots, exactly the design’s canary shape: active is the
full-traffic version (None — the static version serves, the
documented floor); canary binds one candidate to a declared fraction
of new runs while active serves the rest. New runs bind the pointer
at admission (the canary by seeded draw — canary_admits);
in-flight runs keep the version their checkpoint header pins, the same
conservatism as worker-version pinning and manifest pinning.
Fields§
§surface: SurfaceKeyThe surface this pointer governs.
active: Option<CandidateId>The full-traffic candidate (None: the static version serves).
canary: Option<CanaryBinding>The canary binding, when one is declared.
Implementations§
Source§impl VersionPointer
impl VersionPointer
Sourcepub fn new(surface: SurfaceKey) -> Self
pub fn new(surface: SurfaceKey) -> Self
A pointer with nothing promoted: the static version serves.
Sourcepub fn promoted(&self, receipt: &PromotionReceipt) -> VersionPointer
pub fn promoted(&self, receipt: &PromotionReceipt) -> VersionPointer
The pointer after a promotion: a canary promotion binds the
candidate to its fraction (the full-traffic version keeps serving
the rest); a full promotion moves active and clears any canary —
a full promotion supersedes the experiment it graduated from.
Sourcepub fn rolled_back(&self, receipt: &RollbackReceipt) -> VersionPointer
pub fn rolled_back(&self, receipt: &RollbackReceipt) -> VersionPointer
The pointer after a rollback: rolling back the full-traffic
version re-points active to the receipt’s to; rolling back the
canary clears the binding. The caller validates that from is the
serving version before building the receipt — this is the move,
not the check.
Trait Implementations§
Source§impl Clone for VersionPointer
impl Clone for VersionPointer
Source§fn clone(&self) -> VersionPointer
fn clone(&self) -> VersionPointer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more