pub struct RemoteProcessAllocator { /* private fields */ }
Expand description
Allocator with a service frontend that wraps ProcessAllocator.
Implementations§
Source§impl RemoteProcessAllocator
impl RemoteProcessAllocator
Sourcepub async fn start(
&self,
cmd: Command,
serve_addr: ChannelAddr,
timeout: Option<Duration>,
) -> Result<(), Error>
pub async fn start( &self, cmd: Command, serve_addr: ChannelAddr, timeout: Option<Duration>, ) -> Result<(), Error>
Start a remote process allocator with given cmd listening for RemoteProcessAllocatorMessage on serve_addr. Call will block until cancelled. The implementation is simple such that it can only handle one Alloc at a time. Generally that’s the most common use-case. Flow works as follows:
- Client sends Allocate message to serve_addr.
- Allocator connects to bootstrap_addr, creates Alloc and sends Allocated message.
- Allocator streams one or more Update messages to bootstrap_addr as Alloc progresses
making the following changes:
- Remap mesh_agent listen address to our own forwarder actor address.
- Allocator sends Done message to bootstrap_addr when Alloc is done.
At any point, client can send Stop message to serve_addr to stop the allocator. If timeout is Some, the allocator will exit if no client connects within that timeout, and no child allocation is running.
Sourcepub async fn start_with_allocator<A: Allocator + Send + Sync + 'static>(
&self,
serve_addr: ChannelAddr,
process_allocator: A,
timeout: Option<Duration>,
) -> Result<(), Error>
pub async fn start_with_allocator<A: Allocator + Send + Sync + 'static>( &self, serve_addr: ChannelAddr, process_allocator: A, timeout: Option<Duration>, ) -> Result<(), Error>
Start a remote process allocator with given allocator listening for RemoteProcessAllocatorMessage on serve_addr. Used for testing.
Auto Trait Implementations§
impl Freeze for RemoteProcessAllocator
impl RefUnwindSafe for RemoteProcessAllocator
impl Send for RemoteProcessAllocator
impl Sync for RemoteProcessAllocator
impl Unpin for RemoteProcessAllocator
impl UnwindSafe for RemoteProcessAllocator
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§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>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§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