-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Description
It is possible to initialize a resource in main and pass it onto a closure inside handler_fn as a shared reference. Example: https://github.com/awslabs/aws-lambda-rust-runtime/blob/master/lambda-runtime/examples/shared_resource.rs
The downside of this method is that the initialization must be done upfront and the resource cannot be updated.
I've been trying to implement a cache that can be updated from inside the handler, but no matter what I tried it's a breaking change.
Does anyone know a way of updating a shared resource from inside the handler fn without breaking the current handler_fn interface?
Metadata
Metadata
Assignees
Labels
No labels