async-http 0.80.1 → 0.81.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/http/client.rb +16 -5
- data/lib/async/http/version.rb +1 -1
- data/readme.md +5 -1
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +22 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d568651092adf60463aa881e3d8f3df116358a0e8bd46f521d18c0878b89d3e
|
4
|
+
data.tar.gz: f7910bf26008caaaae2a00cec6e02bb9c6c8a4ba494c6d8061e9411ecd60fe35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf77f7faf627288367541ce42305c6f011974f683314b6aff2799dcef685336aaf0a2ea9397b6bbc32a4f59567a9fb3e757ce10d177f1779c204feb1a14a3ab2
|
7
|
+
data.tar.gz: 1961f2216b13441e8d25c7f4b64c84989065bb998fb298655079040754bfd8d6f072a08a7134957ea5b624517d0ab0cf2663570ce13f825b44a15584fcf4adc2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/http/client.rb
CHANGED
@@ -18,7 +18,6 @@ require_relative "protocol"
|
|
18
18
|
module Async
|
19
19
|
module HTTP
|
20
20
|
DEFAULT_RETRIES = 3
|
21
|
-
DEFAULT_CONNECTION_LIMIT = nil
|
22
21
|
|
23
22
|
class Client < ::Protocol::HTTP::Methods
|
24
23
|
# Provides a robust interface to a server.
|
@@ -30,12 +29,12 @@ module Async
|
|
30
29
|
# @param protocol [Protocol::HTTP1 | Protocol::HTTP2 | Protocol::HTTPS] the protocol to use.
|
31
30
|
# @param scheme [String] The default scheme to set to requests.
|
32
31
|
# @param authority [String] The default authority to set to requests.
|
33
|
-
def initialize(endpoint, protocol: endpoint.protocol, scheme: endpoint.scheme, authority: endpoint.authority, retries: DEFAULT_RETRIES,
|
32
|
+
def initialize(endpoint, protocol: endpoint.protocol, scheme: endpoint.scheme, authority: endpoint.authority, retries: DEFAULT_RETRIES, **options)
|
34
33
|
@endpoint = endpoint
|
35
34
|
@protocol = protocol
|
36
35
|
|
37
36
|
@retries = retries
|
38
|
-
@pool = make_pool(
|
37
|
+
@pool = make_pool(**options)
|
39
38
|
|
40
39
|
@scheme = scheme
|
41
40
|
@authority = authority
|
@@ -191,8 +190,20 @@ module Async
|
|
191
190
|
return response
|
192
191
|
end
|
193
192
|
|
194
|
-
def
|
195
|
-
|
193
|
+
def assign_default_tags(tags)
|
194
|
+
tags[:endpoint] = @endpoint.to_s
|
195
|
+
tags[:protocol] = @protocol.to_s
|
196
|
+
end
|
197
|
+
|
198
|
+
def make_pool(**options)
|
199
|
+
if connection_limit = options.delete(:connection_limit)
|
200
|
+
warn "The connection_limit: option is deprecated, please use limit: instead.", uplevel: 2
|
201
|
+
options[:limit] = connection_limit
|
202
|
+
end
|
203
|
+
|
204
|
+
self.assign_default_tags(options[:tags] ||= {})
|
205
|
+
|
206
|
+
Async::Pool::Controller.wrap(**options) do
|
196
207
|
Console.logger.debug(self) {"Making connection to #{@endpoint.inspect}"}
|
197
208
|
|
198
209
|
@protocol.client(@endpoint.connect)
|
data/lib/async/http/version.rb
CHANGED
data/readme.md
CHANGED
@@ -16,6 +16,10 @@ Please see the [project documentation](https://socketry.github.io/async-http/) f
|
|
16
16
|
|
17
17
|
Please see the [project releases](https://socketry.github.io/async-http/releases/index) for all releases.
|
18
18
|
|
19
|
+
### v0.81.0
|
20
|
+
|
21
|
+
- Expose `protocol` and `endpoint` as tags to `async-pool` for improved instrumentation.
|
22
|
+
|
19
23
|
### v0.77.0
|
20
24
|
|
21
25
|
- Improved HTTP/1 connection handling.
|
@@ -29,7 +33,7 @@ Please see the [project releases](https://socketry.github.io/async-http/releases
|
|
29
33
|
|
30
34
|
### v0.75.0
|
31
35
|
|
32
|
-
- Better handling of HTTP/1
|
36
|
+
- Better handling of HTTP/1 \<-\> HTTP/2 proxying, specifically upgrade/CONNECT requests.
|
33
37
|
|
34
38
|
### v0.74.0
|
35
39
|
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.81.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -58,7 +58,7 @@ cert_chain:
|
|
58
58
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
59
59
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
60
60
|
-----END CERTIFICATE-----
|
61
|
-
date: 2024-10-
|
61
|
+
date: 2024-10-13 00:00:00.000000000 Z
|
62
62
|
dependencies:
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: async
|
@@ -80,28 +80,28 @@ dependencies:
|
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '0.
|
83
|
+
version: '0.9'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0.
|
90
|
+
version: '0.9'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: io-endpoint
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0.
|
97
|
+
version: '0.14'
|
98
98
|
type: :runtime
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '0.
|
104
|
+
version: '0.14'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: io-stream
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,16 +162,30 @@ dependencies:
|
|
162
162
|
name: traces
|
163
163
|
requirement: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
|
-
- - "
|
165
|
+
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: '0.10'
|
168
168
|
type: :runtime
|
169
169
|
prerelease: false
|
170
170
|
version_requirements: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- - "
|
172
|
+
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0.10'
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
name: metrics
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - "~>"
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0.12'
|
182
|
+
type: :runtime
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - "~>"
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0.12'
|
175
189
|
description:
|
176
190
|
email:
|
177
191
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|