pub struct PooledClient {
pub base: Uri,
/* private fields */
}Expand description
API client to interact with the AWS Lambda Runtime API, with support for rebuilding its connection pool after a SnapStart VM restore.
Fields§
§base: UriThe runtime API URI
Implementations§
Source§impl PooledClient
impl PooledClient
Sourcepub fn builder() -> PooledClientBuilder
pub fn builder() -> PooledClientBuilder
Create a builder struct to configure the client.
Sourcepub fn call(
&self,
req: Request<Body>,
) -> BoxFuture<'static, Result<Response<Incoming>, BoxError>>
pub fn call( &self, req: Request<Body>, ) -> BoxFuture<'static, Result<Response<Incoming>, BoxError>>
Send a given request to the Runtime API. Use the client’s base URI to ensure the API endpoint is correct.
Sourcepub fn reset_pool(&self)
pub fn reset_pool(&self)
Reset the internal connection pool by building a fresh hyper client that subsequent calls will use.
This is useful after a SnapStart VM restore where existing connections
to the Lambda Runtime API (RAPID) are stale and must be discarded. It is
called exactly once during the restore lifecycle, before concurrent
polling starts, so the underlying OnceLock write never races.
Trait Implementations§
Source§impl Debug for PooledClient
impl Debug for PooledClient
Auto Trait Implementations§
impl !Freeze for PooledClient
impl !RefUnwindSafe for PooledClient
impl !UnwindSafe for PooledClient
impl Send for PooledClient
impl Sync for PooledClient
impl Unpin for PooledClient
impl UnsafeUnpin for PooledClient
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