pub struct VersionRegistry { /* private fields */ }Expand description
Registry tracking version history for all deployed flows.
Implementations§
Source§impl VersionRegistry
impl VersionRegistry
Sourcepub fn record_deploy(
&mut self,
flow_names: &[String],
source: &str,
source_file: &str,
backend: &str,
) -> Vec<(String, u32)>
pub fn record_deploy( &mut self, flow_names: &[String], source: &str, source_file: &str, backend: &str, ) -> Vec<(String, u32)>
Record a new deployment. Returns (flow_name, version_number) pairs.
Sourcepub fn get_history(&self, flow_name: &str) -> Option<&FlowHistory>
pub fn get_history(&self, flow_name: &str) -> Option<&FlowHistory>
Get version history for a flow.
Sourcepub fn get_version(&self, flow_name: &str, version: u32) -> Option<&FlowVersion>
pub fn get_version(&self, flow_name: &str, version: u32) -> Option<&FlowVersion>
Get a specific version of a flow.
Sourcepub fn get_active(&self, flow_name: &str) -> Option<&FlowVersion>
pub fn get_active(&self, flow_name: &str) -> Option<&FlowVersion>
Get the active version of a flow.
Sourcepub fn rollback(
&mut self,
flow_name: &str,
target_version: u32,
) -> Result<String, String>
pub fn rollback( &mut self, flow_name: &str, target_version: u32, ) -> Result<String, String>
Rollback a flow to a specific version. Returns the source code.
Sourcepub fn list_flows(&self) -> Vec<FlowVersionSummary>
pub fn list_flows(&self) -> Vec<FlowVersionSummary>
List all flows with their active version.
Sourcepub fn flow_count(&self) -> usize
pub fn flow_count(&self) -> usize
Total number of tracked flows.
Sourcepub fn total_versions(&self) -> usize
pub fn total_versions(&self) -> usize
Total number of versions across all flows.
Auto Trait Implementations§
impl Freeze for VersionRegistry
impl RefUnwindSafe for VersionRegistry
impl Send for VersionRegistry
impl Sync for VersionRegistry
impl Unpin for VersionRegistry
impl UnsafeUnpin for VersionRegistry
impl UnwindSafe for VersionRegistry
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.