pub struct DeployHistory { /* private fields */ }Expand description
In-memory deploy history, keyed by service name.
Implementations§
Source§impl DeployHistory
impl DeployHistory
Sourcepub fn record(&mut self, config: &ServiceConfig)
pub fn record(&mut self, config: &ServiceConfig)
Record a new deploy for a service.
Keeps at most [MAX_ENTRIES_PER_SERVICE] entries per service,
dropping the oldest when the limit is exceeded.
Sourcepub fn get_previous(&self, service_name: &str) -> Option<&DeployRecord>
pub fn get_previous(&self, service_name: &str) -> Option<&DeployRecord>
Get the second-to-last deploy for rollback.
Returns None if fewer than 2 deploys exist for the service.
Sourcepub fn list(&self, service_name: &str) -> &[DeployRecord]
pub fn list(&self, service_name: &str) -> &[DeployRecord]
List all deploy records for a service (oldest first).
Trait Implementations§
Source§impl Debug for DeployHistory
impl Debug for DeployHistory
Source§impl Default for DeployHistory
impl Default for DeployHistory
Source§fn default() -> DeployHistory
fn default() -> DeployHistory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeployHistory
impl RefUnwindSafe for DeployHistory
impl Send for DeployHistory
impl Sync for DeployHistory
impl Unpin for DeployHistory
impl UnsafeUnpin for DeployHistory
impl UnwindSafe for DeployHistory
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request