pub struct ActorTask {
pub actor_id: String,
pub generation: u32,
pub lifecycle_inbox: UnboundedReceiver<LifecycleCommand>,
pub dispatch_inbox: UnboundedReceiver<DispatchCommand>,
pub lifecycle_events: UnboundedReceiver<LifecycleEvent>,
pub lifecycle: LifecycleState,
pub factory: Arc<ActorFactory>,
pub ctx: ActorContext,
pub start_input: Option<Vec<u8>>,
pub state_save_deadline: Option<Instant>,
pub inspector_serialize_state_deadline: Option<Instant>,
pub sleep_deadline: Option<Instant>,
/* private fields */
}Fields§
§actor_id: String§generation: u32§lifecycle_inbox: UnboundedReceiver<LifecycleCommand>Lifecycle commands (Start / Stop / FireAlarm) sent by the registry
in response to engine-driven EnvoyCallbacks from the envoy client.
dispatch_inbox: UnboundedReceiver<DispatchCommand>Client-originated work sent by RegistryDispatcher in
registry/dispatch.rs (Action, OpenWebSocket, Workflow*) and
registry/http.rs (Http, QueueSend).
lifecycle_events: UnboundedReceiver<LifecycleEvent>Internal self-events the actor enqueues onto itself via ActorContext
hooks (save/inspector/activity notifications from
actor/state.rs, actor/connection.rs, actor/context.rs).
lifecycle: LifecycleState§factory: Arc<ActorFactory>§ctx: ActorContext§start_input: Option<Vec<u8>>§state_save_deadline: Option<Instant>Next deadline at which on_state_save_tick should flush a deferred
state save. Cleared while no save is requested.
inspector_serialize_state_deadline: Option<Instant>Next deadline at which an inspector-driven SerializeState should
fire. Debounces inspector overlay refreshes.
sleep_deadline: Option<Instant>Next deadline at which the actor becomes eligible for sleep if it stays idle. Cleared on activity and during sleep grace.
Implementations§
Source§impl ActorTask
impl ActorTask
pub fn new( actor_id: String, generation: u32, lifecycle_inbox: UnboundedReceiver<LifecycleCommand>, dispatch_inbox: UnboundedReceiver<DispatchCommand>, lifecycle_events: UnboundedReceiver<LifecycleEvent>, factory: Arc<ActorFactory>, ctx: ActorContext, start_input: Option<Vec<u8>>, ) -> Self
pub async fn run(self) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for ActorTask
impl !UnwindSafe for ActorTask
impl Freeze for ActorTask
impl Send for ActorTask
impl Sync for ActorTask
impl Unpin for ActorTask
impl UnsafeUnpin for ActorTask
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request