Skip to main content

FleetClientPool

Struct FleetClientPool 

Source
pub struct FleetClientPool<M>
where M: ClientManager,
{ /* private fields */ }
Expand description

Fleet selection and exchange composition over a process-local client pool.

Implementations§

Source§

impl<M> FleetClientPool<M>
where M: ClientManager,

Source

pub fn new( manager: M, pool: Arc<Pool>, exchanges: Arc<Exchanges>, key: Key, policy: Arc<dyn Policy>, options: FleetPoolOptions, ) -> Result<FleetClientPool<M>, OptionsError>

Source

pub async fn acquire( &self, metadata: &[u8], active_policy: ActiveRequestPolicy, ) -> Result<FleetClient<M>, FleetAcquireError<<M as ClientManager>::Error>>

Source

pub async fn acquire_cancellable( &self, metadata: &[u8], active_policy: ActiveRequestPolicy, cancellation: &CancellationToken, ) -> Result<FleetClient<M>, FleetAcquireError<<M as ClientManager>::Error>>

Acquire one fleet client while also observing caller-owned cancellation.

Source

pub async fn accept( &self, active_policy: ActiveRequestPolicy, ) -> Result<IncomingClientSession<M>, FleetAcquireError<<M as ClientManager>::Error>>

Wait for and accept one remote exchange addressed to a local client.

Source

pub async fn accept_cancellable( &self, active_policy: ActiveRequestPolicy, cancellation: &CancellationToken, ) -> Result<IncomingClientSession<M>, FleetAcquireError<<M as ClientManager>::Error>>

Accept a remote session while observing runtime cancellation.

Source

pub async fn run( &self, cancellation: CancellationToken, ) -> Result<(), FleetAcquireError<<M as ClientManager>::Error>>

Maintain fleet-wide warm capacity and local retirement until cancelled.

Protocol code runs Self::accept separately; this loop never consumes an exchange whose request bytes it cannot interpret.

Source

pub fn apply_local(&self, directive: PoolDirective)

Apply a directive to this process’s admission gate.

This does not claim to pause sibling processes. A fleet-wide admission controller needs a separately managed shared resource; orbit-pool deliberately contains no profile-policy bit.

Source

pub fn resume_local(&self) -> bool

Resume this process’s policy-paused admission gate.

Source

pub fn cancel_active_local(&self) -> bool

Explicitly cancel active local leases after admission has stopped.

Auto Trait Implementations§

§

impl<M> !Freeze for FleetClientPool<M>

§

impl<M> !RefUnwindSafe for FleetClientPool<M>

§

impl<M> !UnwindSafe for FleetClientPool<M>

§

impl<M> Forget for FleetClientPool<M>

§

impl<M> Send for FleetClientPool<M>
where ClientPool<RegisteredManager<M>>: Send,

§

impl<M> Sync for FleetClientPool<M>
where ClientPool<RegisteredManager<M>>: Sync,

§

impl<M> Unpin for FleetClientPool<M>
where ClientPool<RegisteredManager<M>>: Unpin,

§

impl<M> UnsafeUnpin for FleetClientPool<M>
where ClientPool<RegisteredManager<M>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more