pub struct StoredDeployment {
pub name: String,
pub spec: DeploymentSpec,
pub status: DeploymentStatus,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub resolved_image_digests: HashMap<String, String>,
}Expand description
A stored deployment with metadata.
Fields§
§name: StringDeployment name (unique identifier)
spec: DeploymentSpecThe deployment specification (complex nested structure, see spec docs)
status: DeploymentStatusCurrent deployment status
created_at: DateTime<Utc>When the deployment was created
updated_at: DateTime<Utc>When the deployment was last updated
resolved_image_digests: HashMap<String, String>Last successfully-resolved image digest per service, keyed by service
name (e.g. "web" -> "sha256:abc…").
A deployment can carry multiple services, each with its own image, so the digest is keyed by service rather than stored as a single value. This records the digest a service actually pulled so that on daemon restart a service whose image layers are already on local disk can be recreated directly from those layers — pinning the exact digest — without any remote registry or S3 traffic. That breaks the boot-time circular dependency where coming up requires re-pulling an image that is already present.
#[serde(default)] keeps existing stored rows (written before this
field existed) deserializable; skip_serializing_if keeps rows that
never resolved a digest from being bloated with an empty map.
Implementations§
Source§impl StoredDeployment
impl StoredDeployment
Sourcepub fn new(spec: DeploymentSpec) -> Self
pub fn new(spec: DeploymentSpec) -> Self
Create a new stored deployment from a spec.
Sourcepub fn update_spec(&mut self, spec: DeploymentSpec)
pub fn update_spec(&mut self, spec: DeploymentSpec)
Update the deployment spec and timestamp.
Sourcepub fn update_status(&mut self, status: DeploymentStatus)
pub fn update_status(&mut self, status: DeploymentStatus)
Update the deployment status and timestamp.
Trait Implementations§
Source§impl Clone for StoredDeployment
impl Clone for StoredDeployment
Source§fn clone(&self) -> StoredDeployment
fn clone(&self) -> StoredDeployment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more