container_registry/
hooks.rs

1//! Notification hooks for registry changes.
2
3use axum::async_trait;
4
5use super::storage::ManifestReference;
6
7/// A registry hook
8///
9/// Hooks are used by the registry to notify about changes made by external clients.
10///
11/// The unit type `()` implements `RegistryHooks`, silently discarding all notifications.
12#[async_trait]
13pub trait RegistryHooks: Send + Sync {
14    /// Notify about an uploaded manifest.
15    async fn on_manifest_uploaded(&self, manifest_reference: &ManifestReference) {
16        let _ = manifest_reference;
17    }
18}
19
20impl RegistryHooks for () {}