pub struct DeploymentPointer {
pub surface: SurfaceKey,
pub active: Option<RevisionId>,
pub canary: Option<CanaryDeployment>,
}Expand description
The serving revision of one environment: an immutable-pointer move
away from any revision that ever served — the R0.8
crate::learn::VersionPointer shape applied to revisions.
New runs bind the pointer at admission (the canary by seeded draw —
deployment_admission); in-flight runs keep the revision their
journaled resolution names, the same conservatism as checkpoint
pinning. There is no hot reload: a hot-reloaded deployment is a
silent behavioral rewrite, forbidden since R0.8.
Fields§
§surface: SurfaceKeyThe surface this pointer governs (deployment:{env}).
active: Option<RevisionId>The full-traffic revision (None: the environment serves
nothing — there is no implicit “latest”, because latest is a
guess with a deploy’s blast radius).
canary: Option<CanaryDeployment>The canary binding, when one is declared.
Implementations§
Source§impl DeploymentPointer
impl DeploymentPointer
Sourcepub fn new(surface: SurfaceKey) -> Self
pub fn new(surface: SurfaceKey) -> Self
A pointer with nothing serving.
Sourcepub fn promoted(&self, promotion: &RevisionPromotion) -> DeploymentPointer
pub fn promoted(&self, promotion: &RevisionPromotion) -> DeploymentPointer
The pointer after a promotion: active moves to the promoted
revision and any canary clears — a full promotion supersedes the
experiment it graduated from (the
crate::learn::VersionPointer::promoted semantics).
Sourcepub fn rolled_back(&self, rollback: &RevisionRollback) -> DeploymentPointer
pub fn rolled_back(&self, rollback: &RevisionRollback) -> DeploymentPointer
The pointer after a rollback: active re-points to the
revision that served before — byte-exact, because revisions are
content-addressed and immutable, so the restored revision is the
one that served, not a reconstruction. A canary naming the rolled
revision clears with it. The caller derives to from the
journaled transition history before building the rollback — this
is the move, not the check.
Source§impl DeploymentPointer
impl DeploymentPointer
Sourcepub fn canaried(&self, declaration: &CanaryDeclaration) -> DeploymentPointer
pub fn canaried(&self, declaration: &CanaryDeclaration) -> DeploymentPointer
The pointer after a canary declaration: the canary slot binds the
revision and active keeps serving the rest — a canary is an
experiment alongside the serving revision, not a move of it.
Sourcepub fn cleared_canary(&self) -> DeploymentPointer
pub fn cleared_canary(&self) -> DeploymentPointer
The pointer after a canary clearance: the slot empties and
active serves everything again.