pub struct UpdateStore { /* private fields */ }Expand description
Local filesystem update store managing staging/, blobs/sha256/, releases/, channels/, and state/.
Implementations§
Source§impl UpdateStore
Atomic local filesystem storage, staging, monotonic publishing, rollback, and status operations on UpdateStore.
impl UpdateStore
Atomic local filesystem storage, staging, monotonic publishing, rollback, and status operations on UpdateStore.
Sourcepub fn init_layout(&self) -> Result<()>
pub fn init_layout(&self) -> Result<()>
Initializes all required local filesystem store directories (staging/, blobs/sha256/, releases/, channels/, state/events/).
§Returns
io::Result<()>- Directory creation outcome.
Sourcepub fn stage_release(
&self,
project: &str,
channel: &str,
stage_id: &str,
manifest: &ReleaseManifest,
blobs_dir: &Path,
) -> Result<StageReport>
pub fn stage_release( &self, project: &str, channel: &str, stage_id: &str, manifest: &ReleaseManifest, blobs_dir: &Path, ) -> Result<StageReport>
Stages a draft release manifest and its referenced blobs into staging/<stage_id>/ after verifying SHA-256 integrity.
§Arguments
&str- Logical project identifier.&str- Channel name.&str- Unique staging directory name.&ReleaseManifest- Draft release manifest describing artifacts and routes.&Path- Directory containing source blobs named<sha256>or<module_id>@<version>.
§Returns
io::Result<StageReport>- Staging verification summary.
Sourcepub fn publish_stage(
&self,
project: &str,
channel: &str,
stage_id: &str,
signing_key: &[u8],
) -> Result<PublishReport>
pub fn publish_stage( &self, project: &str, channel: &str, stage_id: &str, signing_key: &[u8], ) -> Result<PublishReport>
Publishes a previously staged release atomically with monotonic sequencing, signing, and event log append.
§Arguments
&str- Logical project identifier.&str- Release channel name.&str- Staged directory name insidestaging/.&[u8]- Offline signing secret key bytes (never persisted in server config or store).
§Returns
io::Result<PublishReport>- Atomic publish summary.
Sourcepub fn publish_direct(
&self,
manifest: ReleaseManifest,
blobs: &BTreeMap<String, Vec<u8>>,
signing_key: &[u8],
) -> Result<PublishReport>
pub fn publish_direct( &self, manifest: ReleaseManifest, blobs: &BTreeMap<String, Vec<u8>>, signing_key: &[u8], ) -> Result<PublishReport>
Atomically verifies, promotes blobs, signs with a strictly monotonic sequence, swaps the channel pointer, and records an event.
§Arguments
ReleaseManifest- Target release manifest.&BTreeMap<String, Vec<u8>>- Raw blob bytes keyed by SHA-256 hex digest (may omit blobs already stored).&[u8]- Signing secret key bytes.
§Returns
io::Result<PublishReport>- Atomic publish summary.
Sourcepub fn rollback_release(
&self,
project: &str,
channel: &str,
target_release_seq: u64,
signing_key: &[u8],
) -> Result<PublishReport>
pub fn rollback_release( &self, project: &str, channel: &str, target_release_seq: u64, signing_key: &[u8], ) -> Result<PublishReport>
Executes a monotonic rollback by signing a NEW release sequence pointing back to target_release_seq’s blobs (Sec 11.3).
§Arguments
&str- Logical project identifier.&str- Release channel name.u64- Historical release sequence whose blobs and route graphs should be restored.&[u8]- Offline signing secret key bytes.
§Returns
io::Result<PublishReport>- Report containing the NEW monotonicto_releaseandrollback_of.
Sourcepub fn read_channel_pointer(
&self,
project: &str,
channel: &str,
) -> Result<Option<ChannelPointer>>
pub fn read_channel_pointer( &self, project: &str, channel: &str, ) -> Result<Option<ChannelPointer>>
Sourcepub fn read_release_manifest(
&self,
project: &str,
channel: &str,
release_seq: u64,
) -> Result<Option<ReleaseManifest>>
pub fn read_release_manifest( &self, project: &str, channel: &str, release_seq: u64, ) -> Result<Option<ReleaseManifest>>
Sourcepub fn read_compatible_manifest(
&self,
project: &str,
channel: &str,
negotiation: &ClientNegotiation,
) -> Result<Result<ReleaseManifest, String>>
pub fn read_compatible_manifest( &self, project: &str, channel: &str, negotiation: &ClientNegotiation, ) -> Result<Result<ReleaseManifest, String>>
Negotiates and selects a compatible signed manifest for (project, channel) matching protocol, ABI, delivery mode, and optional track.
§Arguments
&str- Project identifier.&str- Channel name.&ClientNegotiation- Client compatibility declaration.
§Returns
io::Result<Result<ReleaseManifest, String>>- Compatible manifest, incompatibility reason, or I/O error.
Sourcepub fn read_events_after(
&self,
project: &str,
channel: &str,
after_event_id: u64,
) -> Result<Vec<StoredReleaseEvent>>
pub fn read_events_after( &self, project: &str, channel: &str, after_event_id: u64, ) -> Result<Vec<StoredReleaseEvent>>
Sourcepub fn list_active_pointers(&self) -> Result<Vec<ChannelPointer>>
pub fn list_active_pointers(&self) -> Result<Vec<ChannelPointer>>
Lists all active ChannelPointer records currently persisted beneath channels/.
§Returns
io::Result<Vec<ChannelPointer>>- All active pointers in deterministic order.
Source§impl UpdateStore
impl UpdateStore
pub fn get_root(&self) -> &PathBuf
pub fn get_mut_root(&mut self) -> &mut PathBuf
pub fn set_root(&mut self, val: PathBuf) -> &mut Self
pub fn get_max_artifact_bytes(&self) -> u64
pub fn get_mut_max_artifact_bytes(&mut self) -> &mut u64
pub fn set_max_artifact_bytes(&mut self, val: u64) -> &mut Self
Trait Implementations§
Source§impl Clone for UpdateStore
impl Clone for UpdateStore
Source§impl Debug for UpdateStore
impl Debug for UpdateStore
impl Eq for UpdateStore
Source§impl PartialEq for UpdateStore
impl PartialEq for UpdateStore
impl StructuralPartialEq for UpdateStore
Auto Trait Implementations§
impl Forget for UpdateStore
impl Freeze for UpdateStore
impl Move for UpdateStore
impl RefUnwindSafe for UpdateStore
impl Send for UpdateStorewhere
RawVecInner: Send,
impl Sync for UpdateStorewhere
RawVecInner: Sync,
impl Unpin for UpdateStore
impl UnsafeUnpin for UpdateStore
impl UnwindSafe for UpdateStorewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more