pub struct ProcessHeartbeatConfig {
pub base_url: Url,
pub org_id: Uuid,
pub app_id: Uuid,
pub identity: ProcessIdentity,
pub app_version: Option<String>,
pub git_sha: Option<String>,
pub heartbeat_interval: Duration,
pub request_timeout: Duration,
pub shutdown_timeout: Duration,
pub token: Option<String>,
}Fields§
§base_url: Url§org_id: Uuid§app_id: Uuid§identity: ProcessIdentity§app_version: Option<String>§git_sha: Option<String>§heartbeat_interval: Duration§request_timeout: Duration§shutdown_timeout: Duration§token: Option<String>Bearer token for the heartbeat/shutdown endpoints. Defaults to
EYES_TOKEN; override with ProcessHeartbeatConfig::with_token.
Implementations§
Source§impl ProcessHeartbeatConfig
impl ProcessHeartbeatConfig
pub fn new( base_url: Url, org_id: Uuid, app_id: Uuid, identity: ProcessIdentity, heartbeat_interval: Duration, ) -> Self
Sourcepub fn with_token(self, token: impl Into<String>) -> Self
pub fn with_token(self, token: impl Into<String>) -> Self
Override the bearer token, which otherwise defaults to EYES_TOKEN.
Sourcepub fn signal(&self) -> ProcessSignal<'_>
pub fn signal(&self) -> ProcessSignal<'_>
Borrow this config as a ProcessSignal for
send_process_heartbeat / send_process_shutdown.
pub fn from_manifest( base_url: Url, org_id: Uuid, app_id: Uuid, manifest: &AppManifest, ) -> Result<Self, ProcessSignalError>
Trait Implementations§
Source§impl Clone for ProcessHeartbeatConfig
impl Clone for ProcessHeartbeatConfig
Source§fn clone(&self) -> ProcessHeartbeatConfig
fn clone(&self) -> ProcessHeartbeatConfig
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 moreAuto Trait Implementations§
impl Freeze for ProcessHeartbeatConfig
impl RefUnwindSafe for ProcessHeartbeatConfig
impl Send for ProcessHeartbeatConfig
impl Sync for ProcessHeartbeatConfig
impl Unpin for ProcessHeartbeatConfig
impl UnsafeUnpin for ProcessHeartbeatConfig
impl UnwindSafe for ProcessHeartbeatConfig
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