pub struct ActorMeshControlPlane<A: Referable> { /* private fields */ }Expand description
Controller-side state for an actor mesh.
ActorMeshRef is moving toward being a self-contained, serializable mesh
descriptor. The controller is the one place that needs both the actor mesh
and its backing proc mesh: it streams actor state through proc agents and
stops actors through the proc mesh control plane.
Trait Implementations§
Source§impl<A: Referable> Clone for ActorMeshControlPlane<A>
impl<A: Referable> Clone for ActorMeshControlPlane<A>
Source§impl<A: Referable> Controlled for ActorMeshControlPlane<A>
Controlled implementation for an actor mesh.
impl<A: Referable> Controlled for ActorMeshControlPlane<A>
Controlled implementation for an actor mesh.
Source§type StateInner = ActorState
type StateInner = ActorState
Inner payload carried in
resource::State<Self::StateInner>.Source§fn stall_counter() -> &'static Counter<u64>
fn stall_counter() -> &'static Counter<u64>
Counter bumped when the supervision loop detects a stall.
Source§fn id(&self) -> &ResourceId
fn id(&self) -> &ResourceId
The mesh’s resource identifier.
Source§fn subscribe_to_stream(
&self,
cx: &impl Actor,
subscriber: PortRef<State<ActorState>>,
) -> Result<()>
fn subscribe_to_stream( &self, cx: &impl Actor, subscriber: PortRef<State<ActorState>>, ) -> Result<()>
Subscribe the given port to
StreamState<StateInner> updates from
the underlying agents.Source§fn forward_wait_rank_status(
&self,
cx: &impl Actor,
msg: WaitRankStatus,
) -> Result<()>
fn forward_wait_rank_status( &self, cx: &impl Actor, msg: WaitRankStatus, ) -> Result<()>
Forward a
WaitRankStatus message to the underlying agents.Source§fn poll_states<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
supervision_display_name: &'life2 str,
health_state: &'life3 mut HealthState,
) -> Pin<Box<dyn Future<Output = PollResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn poll_states<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
supervision_display_name: &'life2 str,
health_state: &'life3 mut HealthState,
) -> Pin<Box<dyn Future<Output = PollResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Mesh-specific polling step for the supervision loop. Implementations
may do pre-checks (such as the actor mesh’s proc-aliveness check)
before querying rank states; updates to
health_state happen
in-place. supervision_display_name is used for synthesised
supervision events (e.g., when a proc dies).Source§fn process_state(
&self,
cx: &impl Actor,
state: State<ActorState>,
health_state: &mut HealthState,
) -> bool
fn process_state( &self, cx: &impl Actor, state: State<ActorState>, health_state: &mut HealthState, ) -> bool
Process a single streamed or polled state. Updates the health state
and notifies owner/subscribers as appropriate. Returns
true if a
notification was emitted (used to suppress heartbeats).Source§fn handle_stop_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
_supervision_display_name: &'life2 str,
reason: String,
health_state: &'life3 mut HealthState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn handle_stop_request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
_supervision_display_name: &'life2 str,
reason: String,
health_state: &'life3 mut HealthState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Perform the mesh-specific stop: issue stop messages to the underlying
agents and, where appropriate, update
health_state and notify
subscribers. The caller has already taken the monitor and logged.Source§fn cleanup_stop<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
reason: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cleanup_stop<'life0, 'life1, 'async_trait>(
&'life0 self,
cx: &'life1 (impl 'async_trait + Actor),
reason: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop this mesh on controller cleanup (when
Stop was not received
but the actor is shutting down).Source§impl<A: Referable> Debug for ActorMeshControlPlane<A>
impl<A: Referable> Debug for ActorMeshControlPlane<A>
Source§impl<A: Referable> Named for ActorMeshControlPlane<A>
impl<A: Referable> Named for ActorMeshControlPlane<A>
Source§fn typename() -> &'static str
fn typename() -> &'static str
The globally unique type name for the type.
This should typically be the fully qualified Rust name of the type.
Source§fn typehash() -> u64
fn typehash() -> u64
A globally unique hash for this type.
TODO: actually enforce perfect hashing
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
The TypeId for this type. TypeIds are unique only within a binary,
and should not be used for global identification.
Auto Trait Implementations§
impl<A> !Freeze for ActorMeshControlPlane<A>
impl<A> RefUnwindSafe for ActorMeshControlPlane<A>
impl<A> Send for ActorMeshControlPlane<A>
impl<A> Sync for ActorMeshControlPlane<A>
impl<A> Unpin for ActorMeshControlPlane<A>
impl<A> UnsafeUnpin for ActorMeshControlPlane<A>
impl<A> UnwindSafe for ActorMeshControlPlane<A>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].