Struct relay_aws_extension::AwsExtension
source · pub struct AwsExtension { /* private fields */ }
Expand description
Service implementing an AWS extension.
Spawns a service that:
- registers with the AWS extensions API
- sends blocking (0 timeout) NextEvent calls to the extensions API to get the next invocation
Each finished invocation immediately polls for the next event. Note that AWS might freeze the container indefinitely for unused lambdas and this request will also wait until things are active again.
The actual requests are done in a separate tokio runtime with one worker thread with a oneshot channel being used for communicating the necessary responses.
Implementations§
source§impl AwsExtension
impl AwsExtension
sourcepub fn new(aws_runtime_api: &str) -> Result<Self, AwsExtensionError>
pub fn new(aws_runtime_api: &str) -> Result<Self, AwsExtensionError>
Creates a new AwsExtension
instance.
Trait Implementations§
source§impl Debug for AwsExtension
impl Debug for AwsExtension
source§impl Service for AwsExtension
impl Service for AwsExtension
source§fn spawn_handler(self, _rx: Receiver<Self::Interface>)
fn spawn_handler(self, _rx: Receiver<Self::Interface>)
Spawns a task to handle service messages. Read more
§fn start(self) -> Addr<Self::Interface>
fn start(self) -> Addr<Self::Interface>
Starts the service in the current runtime and returns an address for it.
Auto Trait Implementations§
impl !RefUnwindSafe for AwsExtension
impl Send for AwsExtension
impl Sync for AwsExtension
impl Unpin for AwsExtension
impl !UnwindSafe for AwsExtension
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