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

Method build

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

Create the new client to interact with the Runtime API.

(self)

Source from the content-addressed store, hash-verified

133
134 /// Create the new client to interact with the Runtime API.
135 pub fn build(self) -> Result<Client, Error> {
136 let uri = match self.uri {
137 Some(uri) => uri,
138 None => {
139 let uri = std::env::var("AWS_LAMBDA_RUNTIME_API").expect("Missing AWS_LAMBDA_RUNTIME_API env var");
140 uri.try_into().expect("Unable to convert to URL")
141 }
142 };
143 Ok(Client::with(uri, self.connector, self.pool_size))
144 }
145}
146
147/// Create a request builder.

Callers 15

withMethod · 0.80
set_originMethod · 0.80
test_set_originFunction · 0.80
registerMethod · 0.80
runMethod · 0.80
handler_without_defaultFunction · 0.80
handler_with_defaultFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
function_handlerFunction · 0.80

Calls

no outgoing calls

Tested by 13

test_set_originFunction · 0.64
test_next_eventFunction · 0.64
test_ok_responseFunction · 0.64
test_error_responseFunction · 0.64
test_successful_responseFunction · 0.64
test_410_timeout_errorFunction · 0.64
test_500_errorFunction · 0.64
test_404_errorFunction · 0.64
test_request_build_errorFunction · 0.64