pub struct PersistentConfig {
pub readiness: PersistentReadiness,
pub readiness_timeout: Duration,
pub shutdown_grace_period: Duration,
pub max_capture_bytes: Option<usize>,
pub output: PersistentOutput,
}Expand description
Configuration for a persistent process.
Fields§
§readiness: PersistentReadinessReadiness policy used before returning the running process.
readiness_timeout: DurationMaximum time to wait for readiness.
shutdown_grace_period: DurationMaximum time to wait after a graceful shutdown request before killing.
max_capture_bytes: Option<usize>Maximum retained bytes for each captured output stream.
output: PersistentOutputOutput forwarding policy.
Implementations§
Source§impl PersistentConfig
impl PersistentConfig
Sourcepub fn with_readiness(self, readiness: PersistentReadiness) -> Self
pub fn with_readiness(self, readiness: PersistentReadiness) -> Self
Set the readiness policy.
Sourcepub fn with_readiness_timeout(self, timeout: Duration) -> Self
pub fn with_readiness_timeout(self, timeout: Duration) -> Self
Set the readiness timeout.
Sourcepub fn with_shutdown_grace_period(self, grace_period: Duration) -> Self
pub fn with_shutdown_grace_period(self, grace_period: Duration) -> Self
Set the shutdown grace period.
Sourcepub fn with_max_capture_bytes(self, bytes: usize) -> Self
pub fn with_max_capture_bytes(self, bytes: usize) -> Self
Set the maximum retained bytes for each captured output stream.
Sourcepub fn with_unbounded_capture(self) -> Self
pub fn with_unbounded_capture(self) -> Self
Disable capture bounds.
Sourcepub fn with_output(self, output: PersistentOutput) -> Self
pub fn with_output(self, output: PersistentOutput) -> Self
Set the output forwarding policy.
Trait Implementations§
Source§impl Clone for PersistentConfig
impl Clone for PersistentConfig
Source§fn clone(&self) -> PersistentConfig
fn clone(&self) -> PersistentConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PersistentConfig
impl Debug for PersistentConfig
Auto Trait Implementations§
impl Freeze for PersistentConfig
impl RefUnwindSafe for PersistentConfig
impl Send for PersistentConfig
impl Sync for PersistentConfig
impl Unpin for PersistentConfig
impl UnsafeUnpin for PersistentConfig
impl UnwindSafe for PersistentConfig
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