pub struct RestartEvent {
pub agent_id: String,
pub old_pid: u64,
pub new_pid: u64,
pub exit_code: i32,
pub strategy: String,
pub backoff_ms: u64,
pub timestamp: DateTime<Utc>,
}Expand description
A restart event suitable for chain logging.
Created by the supervisor after successfully restarting an agent.
Fields§
§agent_id: StringThe agent identifier that was restarted.
old_pid: u64PID of the process that crashed / was stopped.
new_pid: u64PID of the newly spawned replacement process.
exit_code: i32Exit code that triggered the restart.
strategy: StringRestart strategy that was applied.
backoff_ms: u64Backoff delay in milliseconds before the restart was attempted.
timestamp: DateTime<Utc>Timestamp of the restart.
Trait Implementations§
Source§impl ChainLoggable for RestartEvent
impl ChainLoggable for RestartEvent
Source§fn chain_event_source(&self) -> &str
fn chain_event_source(&self) -> &str
The source subsystem (e.g. “supervisor”, “governance”, “ipc”).
Source§fn chain_event_kind(&self) -> &str
fn chain_event_kind(&self) -> &str
The event kind string (e.g. “agent.restart”, “governance.deny”).
Source§fn chain_event_payload(&self) -> Value
fn chain_event_payload(&self) -> Value
Build the JSON payload for the chain event.
Auto Trait Implementations§
impl Freeze for RestartEvent
impl RefUnwindSafe for RestartEvent
impl Send for RestartEvent
impl Sync for RestartEvent
impl Unpin for RestartEvent
impl UnsafeUnpin for RestartEvent
impl UnwindSafe for RestartEvent
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 more