aws_lambda_ric 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws_lambda_ric/lambda_server.rb +19 -4
- data/lib/aws_lambda_ric/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a32b2e9a2c95af59f7e0de80897fa13b66eb4ebfcec16724442838dac7da1252
|
|
4
|
+
data.tar.gz: 8f4705a87e4cd1965367be9bf20f42e23bdb3f93fd4bcc51678b0a98f91bdf83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bb5a3df6adcb041e44ec97a9e9c7c7298d563d470ded5bb315a726f91bc3ede4ad5a12edee8394d1a9b8f2d957e7358009f591f4f9768377d9ea0171decfeff
|
|
7
|
+
data.tar.gz: 43ff3130747ab3851c0a8d322098151de3d2f9452ff379fb0b506fe324786b69a42627cf47bfc6f8fdef377dd0962d776b11d6ab4d4f8a2d22d6a3678d44cf3e
|
|
@@ -20,7 +20,7 @@ class RapidClient
|
|
|
20
20
|
def next_invocation
|
|
21
21
|
next_invocation_uri = URI(@server_address + '/runtime/invocation/next')
|
|
22
22
|
begin
|
|
23
|
-
http =
|
|
23
|
+
http = build_client(next_invocation_uri)
|
|
24
24
|
http.read_timeout = LONG_TIMEOUT_MS
|
|
25
25
|
resp = http.start do |connection|
|
|
26
26
|
connection.get(next_invocation_uri.path, { 'User-Agent' => @user_agent })
|
|
@@ -49,7 +49,7 @@ class RapidClient
|
|
|
49
49
|
if content_type == 'application/unknown'
|
|
50
50
|
response_object = response_object.read
|
|
51
51
|
end
|
|
52
|
-
|
|
52
|
+
post(
|
|
53
53
|
response_uri,
|
|
54
54
|
response_object,
|
|
55
55
|
{ 'Content-Type' => content_type, 'User-Agent' => @user_agent }
|
|
@@ -64,7 +64,7 @@ class RapidClient
|
|
|
64
64
|
begin
|
|
65
65
|
headers = { 'Lambda-Runtime-Function-Error-Type' => error.runtime_error_type, 'User-Agent' => @user_agent }
|
|
66
66
|
headers['Lambda-Runtime-Function-XRay-Error-Cause'] = xray_cause if xray_cause.bytesize < MAX_HEADER_SIZE_BYTES
|
|
67
|
-
|
|
67
|
+
post(
|
|
68
68
|
response_uri,
|
|
69
69
|
error_object.to_json,
|
|
70
70
|
headers
|
|
@@ -77,7 +77,7 @@ class RapidClient
|
|
|
77
77
|
def send_init_error(error_object:, error:)
|
|
78
78
|
uri = URI("#{@server_address}/runtime/init/error")
|
|
79
79
|
begin
|
|
80
|
-
|
|
80
|
+
post(
|
|
81
81
|
uri,
|
|
82
82
|
error_object.to_json,
|
|
83
83
|
{ 'Lambda-Runtime-Function-Error-Type' => error.runtime_error_type, 'User-Agent' => @user_agent }
|
|
@@ -86,4 +86,19 @@ class RapidClient
|
|
|
86
86
|
raise LambdaErrors::LambdaRuntimeInitError.new(e)
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
|
+
|
|
90
|
+
private
|
|
91
|
+
|
|
92
|
+
# The Runtime API endpoint must never be proxied. The nil proxy argument
|
|
93
|
+
# disables Net::HTTP's default :ENV proxy resolution, which would otherwise
|
|
94
|
+
# route calls through a customer-configured PROXY.
|
|
95
|
+
def build_client(uri)
|
|
96
|
+
Net::HTTP.new(uri.host, uri.port, nil)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def post(uri, body, headers)
|
|
100
|
+
build_client(uri).start do |connection|
|
|
101
|
+
connection.post(uri.path, body, headers)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
89
104
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aws_lambda_ric
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.
|
|
4
|
+
version: 3.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- AWS Lambda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: logger
|