MCPcopy Index your code
hub / github.com/aws/aws-lambda-rust-runtime / with

Method with

lambda-runtime-api-client/src/lib.rs:64–74  ·  view source on GitHub ↗

Create a new client with a given base URI, HTTP connector, and optional pool size hint.

(base: Uri, connector: HttpConnector, pool_size: Option<usize>)

Source from the content-addressed store, hash-verified

62
63 /// Create a new client with a given base URI, HTTP connector, and optional pool size hint.
64 fn with(base: Uri, connector: HttpConnector, pool_size: Option<usize>) -> Self {
65 let mut builder = hyper_util::client::legacy::Client::builder(hyper_util::rt::TokioExecutor::new());
66 builder.http1_max_buf_size(1024 * 1024);
67
68 if let Some(size) = pool_size {
69 builder.pool_max_idle_per_host(size);
70 }
71
72 let client = builder.build(connector);
73 Self { base, client }
74 }
75
76 fn set_origin<B>(&self, req: Request<B>) -> Result<Request<B>, BoxError> {
77 let (mut parts, body) = req.into_parts();

Callers 5

mainFunction · 0.80
mainFunction · 0.80

Calls 1

buildMethod · 0.80