pub trait DeploymentDigestSink:
Send
+ Sync
+ Debug {
// Required method
fn record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
deployment: &'life1 str,
service: &'life2 str,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Sink the runtime uses to persist a service’s most-recently-resolved image digest into the deployment store, so a daemon restart can recreate the service from the already-local image (by digest) with zero remote/S3 traffic.
Implemented in the zlayer bin over the daemon’s DeploymentStorage
(SqlxStorage in ZLayer, the ZQL store in ZLayerZQL). The agent itself
must NOT depend on the storage layer — that would be a dependency cycle — so
the concrete write lives in the bin and is threaded in as this trait object.
record is best-effort: a failed store update is logged by the implementor
and MUST NOT fail the deploy/scale that triggered the pull. Breaking the
boot-time circular dependency (ZLayer using its own ZataStorage S3
backend as the blob cache) is the whole point — see
crate::service::ServiceInstance::set_restore_pin.
Required Methods§
Sourcefn record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
deployment: &'life1 str,
service: &'life2 str,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
deployment: &'life1 str,
service: &'life2 str,
digest: &'life3 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Persist digest (e.g. "sha256:abc…") as the resolved image digest for
service within deployment, keyed by service name in
StoredDeployment.resolved_image_digests. Best-effort; never panics.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".