pub struct DaemonConfig {
pub port: u16,
pub idle_timeout: Option<Duration>,
}Expand description
Configuration for the daemon process.
Fields§
§port: u16§idle_timeout: Option<Duration>Idle timeout duration. When None, the daemon never auto-shuts down due to
inactivity (default behavior). When Some, the daemon shuts down after the
specified duration without client activity.
Implementations§
Source§impl DaemonConfig
impl DaemonConfig
Sourcepub fn from_args(port: u16, idle_timeout_secs: Option<u64>) -> Self
pub fn from_args(port: u16, idle_timeout_secs: Option<u64>) -> Self
Construct a DaemonConfig from CLI args and environment variables.
Idle-timeout resolution:
- If
idle_timeout_secsisSome, use that value. - Otherwise, if
HYPERDB_DAEMON_IDLE_TIMEOUTenv var is set and parseable, use it. - Otherwise,
None(never auto-shutdown).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DaemonConfig
impl RefUnwindSafe for DaemonConfig
impl Send for DaemonConfig
impl Sync for DaemonConfig
impl Unpin for DaemonConfig
impl UnsafeUnpin for DaemonConfig
impl UnwindSafe for DaemonConfig
Blanket Implementations§
impl<T> Allocation 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
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> 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