prefect_aws.microvm.server
HTTP server for the AWS Lambda MicroVM lifecycle hooks.
Classes
LifecycleHookServer
Serves the MicroVM lifecycle hooks and hands the first valid /run request
to the thread that calls wait_for_run_request.
Hooks are accepted both at /<hook> and at
/aws/lambda-microvms/runtime/v1/<hook>.
Methods:
claim_run
/run request and False for every later one.
process_request
process_request_thread
server_bind
stop_serving
timeout seconds for the
requests in progress to finish, so that no handler thread holds a lock
when the process forks. Requests still in progress after timeout are
logged and left running.
Args:
timeout: The longest time to wait for requests in progress, in seconds.
submit_run
/run request, or the reason it was rejected, to wait_for_run_request.
wait_for_run_request
/run request has been answered, then return it.
LifecycleHookHandler
Request handler for LifecycleHookServer.
Methods: