Skip to content

Commit 75af349

Browse files
authored
Release v0.4.1 (#88)
* update README for readiness check * optimize imports * release v0.4.1
1 parent d4b9d6d commit 75af349

File tree

4 files changed

+11
-70
lines changed

4 files changed

+11
-70
lines changed

Cargo.lock

+1-61
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lambda_web_adapter"
3-
version = "0.4.0"
3+
version = "0.4.1"
44
authors = [
55
"Harold Sun <[email protected]>",
66
"David Calavera <[email protected]>",
@@ -17,7 +17,6 @@ readme = "README.md"
1717
exclude = ["examples"]
1818

1919
[dependencies]
20-
env_logger = "0.8.3"
2120
http = "0.2.4"
2221
lambda-extension = "0.6.0"
2322
lambda_http = "0.6.1"

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ For details, please check out [the example nodejs application](examples/expressj
5757

5858
When a new Lambda Execution Environment starts up, Lambda Web Adapter will boot up as a Lambda Extension, followed by the web application.
5959

60-
Lambda Web Adapter will send HTTP GET requests to the web application at `http://127.0.0.1:{READINESS_CHECK_PORT}{READINESS_CHECK_PATH}`.
60+
By default, Lambda Web Adapter will send HTTP GET requests to the web application at `http://127.0.0.1:8080/`. The port and path can be customized with two environment variables: `READINESS_CHECK_PORT` and `READINESS_CHECK_PATH`.
6161

6262
Lambda Web Adapter will retry this request every 10 milliseconds until the web application returns a successful response (http status code 2xx) or the function times out.
6363

64+
In addition, you can configure the adapter to preform readiness check with TCP connect, by setting `READINESS_CHECK_PROTOCOL` to `tcp`.
65+
6466
After passing readiness check, Lambda Web Adapter will start Lambda Runtime and forward the invokes to the web application.
6567

6668
### Configurations

src/lib.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use http_body::Body as HttpBody;
5-
use lambda_extension::Extension;
6-
use lambda_http::{Body, Request, RequestExt, Response};
7-
use reqwest::{redirect, Client, Url};
84
use std::{
95
env,
106
future::Future,
@@ -16,13 +12,17 @@ use std::{
1612
},
1713
time::Duration,
1814
};
15+
16+
use http_body::Body as HttpBody;
17+
use lambda_extension::Extension;
18+
pub use lambda_http::Error;
19+
use lambda_http::{Body, Request, RequestExt, Response};
20+
use reqwest::{redirect, Client, Url};
1921
use tokio::net::TcpStream;
2022
use tokio::time::timeout;
2123
use tokio_retry::{strategy::FixedInterval, Retry};
2224
use tower::Service;
2325

24-
pub use lambda_http::Error;
25-
2626
#[derive(Debug, Clone, Copy)]
2727
pub enum Protocol {
2828
Http,

0 commit comments

Comments
 (0)