async-redis 0.7.0 → 0.8.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 +2 -0
- data/lib/async/redis/client.rb +6 -19
- data/lib/async/redis/context/generic.rb +3 -20
- data/lib/async/redis/context/pipeline.rb +4 -20
- data/lib/async/redis/context/subscribe.rb +2 -19
- data/lib/async/redis/context/transaction.rb +2 -19
- data/lib/async/redis/key.rb +2 -19
- data/lib/async/redis/protocol/resp2.rb +2 -19
- data/lib/async/redis/sentinels.rb +4 -0
- data/lib/async/redis/version.rb +3 -20
- data/lib/async/redis.rb +3 -19
- data/license.md +32 -0
- data/readme.md +118 -0
- data.tar.gz.sig +1 -0
- metadata +40 -122
- 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: 46c7b31b58959e0fe6165b3c2b506d9948d095477a5c9efd656dbcb590bfbfe1
|
4
|
+
data.tar.gz: 5d1b6ba10c70e35796b3ee7d02d2be2678dbb99c5fec21be5c2a37eb38aeea41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c117ee7b68fc57780806754c976686bfff540e22e2077b518892fcd863fe9b86b98dbbf69a37dd7b647f7bf6ad7a4fed1e82071db72c8549fb09bf39e79814a
|
7
|
+
data.tar.gz: 95870e075f3528b95a3503fc3d597a8e9fefe9e038d2f9f62448a8cb1b6df9fb2ae67dc24e5dbadd4798b3619f09089f6dbe2f1058d53895f2b2636df952152f
|
checksums.yaml.gz.sig
ADDED
data/lib/async/redis/client.rb
CHANGED
@@ -1,24 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2023, by Samuel Williams.
|
5
|
+
# Copyright, 2018, by Huba Nagy.
|
6
|
+
# Copyright, 2019, by Mikael Henriksson.
|
7
|
+
# Copyright, 2019, by David Ortiz.
|
8
|
+
# Copyright, 2020, by Salim Semaoune.
|
22
9
|
|
23
10
|
require_relative 'context/pipeline'
|
24
11
|
require_relative 'context/transaction'
|
@@ -1,25 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
# Copyright,
|
5
|
-
#
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
# of this software and associated documentation files (the "Software"), to deal
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019, by Mikael Henriksson.
|
5
|
+
# Copyright, 2019-2023, by Samuel Williams.
|
23
6
|
|
24
7
|
require 'protocol/redis/methods'
|
25
8
|
|
@@ -1,25 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
# Copyright, 2019, by
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# of this software and associated documentation files (the "Software"), to deal
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019, by David Ortiz.
|
5
|
+
# Copyright, 2019-2023, by Samuel Williams.
|
6
|
+
# Copyright, 2022, by Tim Willard.
|
23
7
|
|
24
8
|
require_relative 'generic'
|
25
9
|
|
@@ -1,25 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
3
|
+
# Released under the MIT License.
|
4
4
|
# Copyright, 2018, by Huba Nagy.
|
5
|
-
#
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
# of this software and associated documentation files (the "Software"), to deal
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2018-2023, by Samuel Williams.
|
23
6
|
|
24
7
|
require_relative 'generic'
|
25
8
|
|
@@ -1,25 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
3
|
+
# Released under the MIT License.
|
4
4
|
# Copyright, 2018, by Huba Nagy.
|
5
|
-
#
|
6
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
# of this software and associated documentation files (the "Software"), to deal
|
8
|
-
# in the Software without restriction, including without limitation the rights
|
9
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
# copies of the Software, and to permit persons to whom the Software is
|
11
|
-
# furnished to do so, subject to the following conditions:
|
12
|
-
#
|
13
|
-
# The above copyright notice and this permission notice shall be included in
|
14
|
-
# all copies or substantial portions of the Software.
|
15
|
-
#
|
16
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
# THE SOFTWARE.
|
5
|
+
# Copyright, 2018-2023, by Samuel Williams.
|
23
6
|
|
24
7
|
require_relative 'pipeline'
|
25
8
|
|
data/lib/async/redis/key.rb
CHANGED
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2019-2023, by Samuel Williams.
|
22
5
|
|
23
6
|
module Async
|
24
7
|
module Redis
|
@@ -1,24 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2023, by Samuel Williams.
|
22
5
|
|
23
6
|
require 'protocol/redis'
|
24
7
|
|
data/lib/async/redis/version.rb
CHANGED
@@ -1,27 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2023, by Samuel Williams.
|
22
5
|
|
23
6
|
module Async
|
24
7
|
module Redis
|
25
|
-
VERSION = "0.
|
8
|
+
VERSION = "0.8.0"
|
26
9
|
end
|
27
10
|
end
|
data/lib/async/redis.rb
CHANGED
@@ -1,24 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2018-2023, by Samuel Williams.
|
5
|
+
# Copyright, 2020, by David Ortiz.
|
22
6
|
|
23
7
|
require_relative 'redis/version'
|
24
8
|
require_relative 'redis/client'
|
data/license.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2018-2023, by Samuel Williams.
|
4
|
+
Copyright, 2018, by Huba Nagy.
|
5
|
+
Copyright, 2019-2020, by David Ortiz.
|
6
|
+
Copyright, 2019, by Pierre Montelle.
|
7
|
+
Copyright, 2019, by Jeremy Jung.
|
8
|
+
Copyright, 2019, by Mikael Henriksson.
|
9
|
+
Copyright, 2020, by Salim Semaoune.
|
10
|
+
Copyright, 2021, by Alex Matchneer.
|
11
|
+
Copyright, 2021, by Olle Jonsson.
|
12
|
+
Copyright, 2021, by Troex Nevelin.
|
13
|
+
Copyright, 2022, by Tim Willard.
|
14
|
+
Copyright, 2022, by Gleb Sinyavskiy.
|
15
|
+
|
16
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
17
|
+
of this software and associated documentation files (the "Software"), to deal
|
18
|
+
in the Software without restriction, including without limitation the rights
|
19
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
20
|
+
copies of the Software, and to permit persons to whom the Software is
|
21
|
+
furnished to do so, subject to the following conditions:
|
22
|
+
|
23
|
+
The above copyright notice and this permission notice shall be included in all
|
24
|
+
copies or substantial portions of the Software.
|
25
|
+
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
32
|
+
SOFTWARE.
|
data/readme.md
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
# Async::Redis
|
2
|
+
|
3
|
+
An asynchronous client for Redis including TLS. Support for streaming requests and responses. Built on top of [async](https://github.com/socketry/async) and [async-io](https://github.com/socketry/async-io).
|
4
|
+
|
5
|
+
[![Development Status](https://github.com/socketry/async-redis/workflows/Test/badge.svg)](https://github.com/socketry/async-redis/actions?workflow=Test)
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
``` shell
|
10
|
+
$ bundle add async-redis
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
### Basic Local Connection
|
16
|
+
|
17
|
+
``` ruby
|
18
|
+
require 'async/redis'
|
19
|
+
|
20
|
+
endpoint = Async::Redis.local_endpoint
|
21
|
+
client = Async::Redis::Client.new(endpoint)
|
22
|
+
|
23
|
+
Async do
|
24
|
+
pp client.info
|
25
|
+
ensure
|
26
|
+
client.close
|
27
|
+
end
|
28
|
+
```
|
29
|
+
|
30
|
+
### Connecting to Redis SSL Endpoint
|
31
|
+
|
32
|
+
This example demonstrates parsing an environment variable with a `redis://` or SSL `rediss://` scheme, and demonstrates how you can specify SSL parameters on the SSLContext object.
|
33
|
+
|
34
|
+
``` ruby
|
35
|
+
require 'async/redis'
|
36
|
+
|
37
|
+
def make_redis_endpoint(uri)
|
38
|
+
tcp_endpoint = Async::IO::Endpoint.tcp(uri.hostname, uri.port)
|
39
|
+
case uri.scheme
|
40
|
+
when 'redis'
|
41
|
+
tcp_endpoint
|
42
|
+
when 'rediss'
|
43
|
+
ssl_context = OpenSSL::SSL::SSLContext.new
|
44
|
+
ssl_context.set_params(
|
45
|
+
ca_file: "/path/to/ca.crt",
|
46
|
+
cert: OpenSSL::X509::Certificate.new(File.read("client.crt")),
|
47
|
+
key: OpenSSL::PKey::RSA.new(File.read("client.key")),
|
48
|
+
)
|
49
|
+
Async::IO::SSLEndpoint.new(tcp_endpoint, ssl_context: ssl_context)
|
50
|
+
else
|
51
|
+
raise ArgumentError
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
endpoint = make_redis_endpoint(URI(ENV['REDIS_URL']))
|
56
|
+
client = Async::Redis::Client.new(endpoint)
|
57
|
+
|
58
|
+
# ...
|
59
|
+
```
|
60
|
+
|
61
|
+
### Variables
|
62
|
+
|
63
|
+
``` ruby
|
64
|
+
require 'async'
|
65
|
+
require 'async/redis'
|
66
|
+
|
67
|
+
endpoint = Async::Redis.local_endpoint
|
68
|
+
client = Async::Redis::Client.new(endpoint)
|
69
|
+
|
70
|
+
Async do
|
71
|
+
client.set('X', 10)
|
72
|
+
pp client.get('X')
|
73
|
+
ensure
|
74
|
+
client.close
|
75
|
+
end
|
76
|
+
```
|
77
|
+
|
78
|
+
### Subscriptions
|
79
|
+
|
80
|
+
``` ruby
|
81
|
+
require 'async'
|
82
|
+
require 'async/redis'
|
83
|
+
|
84
|
+
endpoint = Async::Redis.local_endpoint
|
85
|
+
client = Async::Redis::Client.new(endpoint)
|
86
|
+
|
87
|
+
Async do |task|
|
88
|
+
condition = Async::Condition.new
|
89
|
+
|
90
|
+
publisher = task.async do
|
91
|
+
condition.wait
|
92
|
+
|
93
|
+
client.publish 'status.frontend', 'good'
|
94
|
+
end
|
95
|
+
|
96
|
+
subscriber = task.async do
|
97
|
+
client.subscribe 'status.frontend' do |context|
|
98
|
+
condition.signal # We are waiting for messages.
|
99
|
+
|
100
|
+
type, name, message = context.listen
|
101
|
+
|
102
|
+
pp type, name, message
|
103
|
+
end
|
104
|
+
end
|
105
|
+
ensure
|
106
|
+
client.close
|
107
|
+
end
|
108
|
+
```
|
109
|
+
|
110
|
+
## Contributing
|
111
|
+
|
112
|
+
We welcome contributions to this project.
|
113
|
+
|
114
|
+
1. Fork it.
|
115
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
116
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
117
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
118
|
+
5. Create new Pull Request.
|
data.tar.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
4KB��'�֬�1�A���bPƓx;ϒ�$\! �����Z[Ź���4�C���܊���$*T�T��6��i_}��Z�A�����g�<E �W����,�O��Fz�Z���5�e�\Po�����>#��G|��}Wn�л�l%g+++d�>��j)ׇP�4w�r@AyƏ[������-p�Lhl�l�/��/�2G^��Wj��[�����:�y���?2����,�����6h��1��aB��[pet��9���t�o�7�%��LL!��ޭ [���cx��TZ���}o��}���
|
metadata
CHANGED
@@ -1,26 +1,54 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Huba Nagy
|
9
9
|
- David Ortiz
|
10
10
|
- Gleb Sinyavskiy
|
11
|
+
- Mikael Henriksson
|
11
12
|
- Troex Nevelin
|
13
|
+
- Alex Matchneer
|
12
14
|
- Jeremy Jung
|
13
|
-
- Mika Hel
|
14
|
-
- Mikael Henriksson
|
15
15
|
- Olle Jonsson
|
16
|
+
- Pierre Montelle
|
16
17
|
- Salim Semaoune
|
17
18
|
- Tim Willard
|
18
|
-
- k1tsu
|
19
|
-
- machty
|
20
19
|
autorequire:
|
21
20
|
bindir: bin
|
22
|
-
cert_chain:
|
23
|
-
|
21
|
+
cert_chain:
|
22
|
+
- |
|
23
|
+
-----BEGIN CERTIFICATE-----
|
24
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
25
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
26
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
27
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
28
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
29
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
30
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
31
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
32
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
33
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
34
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
35
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
36
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
37
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
38
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
39
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
40
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
41
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
42
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
43
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
44
|
+
c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
|
45
|
+
8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
|
46
|
+
JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
|
47
|
+
eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
|
48
|
+
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
49
|
+
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
50
|
+
-----END CERTIFICATE-----
|
51
|
+
date: 2023-06-13 00:00:00.000000000 Z
|
24
52
|
dependencies:
|
25
53
|
- !ruby/object:Gem::Dependency
|
26
54
|
name: async
|
@@ -76,126 +104,14 @@ dependencies:
|
|
76
104
|
requirements:
|
77
105
|
- - "~>"
|
78
106
|
- !ruby/object:Gem::Version
|
79
|
-
version: 0.
|
107
|
+
version: 0.8.0
|
80
108
|
type: :runtime
|
81
109
|
prerelease: false
|
82
110
|
version_requirements: !ruby/object:Gem::Requirement
|
83
111
|
requirements:
|
84
112
|
- - "~>"
|
85
113
|
- !ruby/object:Gem::Version
|
86
|
-
version: 0.
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: async-rspec
|
89
|
-
requirement: !ruby/object:Gem::Requirement
|
90
|
-
requirements:
|
91
|
-
- - "~>"
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '1.1'
|
94
|
-
type: :development
|
95
|
-
prerelease: false
|
96
|
-
version_requirements: !ruby/object:Gem::Requirement
|
97
|
-
requirements:
|
98
|
-
- - "~>"
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: '1.1'
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: benchmark-ips
|
103
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - ">="
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '0'
|
108
|
-
type: :development
|
109
|
-
prerelease: false
|
110
|
-
version_requirements: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: '0'
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: bundler
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0'
|
122
|
-
type: :development
|
123
|
-
prerelease: false
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - ">="
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0'
|
129
|
-
- !ruby/object:Gem::Dependency
|
130
|
-
name: covered
|
131
|
-
requirement: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - ">="
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: '0'
|
136
|
-
type: :development
|
137
|
-
prerelease: false
|
138
|
-
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
requirements:
|
140
|
-
- - ">="
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
143
|
-
- !ruby/object:Gem::Dependency
|
144
|
-
name: hiredis
|
145
|
-
requirement: !ruby/object:Gem::Requirement
|
146
|
-
requirements:
|
147
|
-
- - ">="
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version: '0'
|
150
|
-
type: :development
|
151
|
-
prerelease: false
|
152
|
-
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
requirements:
|
154
|
-
- - ">="
|
155
|
-
- !ruby/object:Gem::Version
|
156
|
-
version: '0'
|
157
|
-
- !ruby/object:Gem::Dependency
|
158
|
-
name: rake
|
159
|
-
requirement: !ruby/object:Gem::Requirement
|
160
|
-
requirements:
|
161
|
-
- - ">="
|
162
|
-
- !ruby/object:Gem::Version
|
163
|
-
version: '0'
|
164
|
-
type: :development
|
165
|
-
prerelease: false
|
166
|
-
version_requirements: !ruby/object:Gem::Requirement
|
167
|
-
requirements:
|
168
|
-
- - ">="
|
169
|
-
- !ruby/object:Gem::Version
|
170
|
-
version: '0'
|
171
|
-
- !ruby/object:Gem::Dependency
|
172
|
-
name: redis
|
173
|
-
requirement: !ruby/object:Gem::Requirement
|
174
|
-
requirements:
|
175
|
-
- - ">="
|
176
|
-
- !ruby/object:Gem::Version
|
177
|
-
version: '0'
|
178
|
-
type: :development
|
179
|
-
prerelease: false
|
180
|
-
version_requirements: !ruby/object:Gem::Requirement
|
181
|
-
requirements:
|
182
|
-
- - ">="
|
183
|
-
- !ruby/object:Gem::Version
|
184
|
-
version: '0'
|
185
|
-
- !ruby/object:Gem::Dependency
|
186
|
-
name: rspec
|
187
|
-
requirement: !ruby/object:Gem::Requirement
|
188
|
-
requirements:
|
189
|
-
- - "~>"
|
190
|
-
- !ruby/object:Gem::Version
|
191
|
-
version: '3.6'
|
192
|
-
type: :development
|
193
|
-
prerelease: false
|
194
|
-
version_requirements: !ruby/object:Gem::Requirement
|
195
|
-
requirements:
|
196
|
-
- - "~>"
|
197
|
-
- !ruby/object:Gem::Version
|
198
|
-
version: '3.6'
|
114
|
+
version: 0.8.0
|
199
115
|
description:
|
200
116
|
email:
|
201
117
|
executables: []
|
@@ -212,6 +128,8 @@ files:
|
|
212
128
|
- lib/async/redis/protocol/resp2.rb
|
213
129
|
- lib/async/redis/sentinels.rb
|
214
130
|
- lib/async/redis/version.rb
|
131
|
+
- license.md
|
132
|
+
- readme.md
|
215
133
|
homepage: https://github.com/socketry/async-redis
|
216
134
|
licenses:
|
217
135
|
- MIT
|
@@ -231,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
149
|
- !ruby/object:Gem::Version
|
232
150
|
version: '0'
|
233
151
|
requirements: []
|
234
|
-
rubygems_version: 3.
|
152
|
+
rubygems_version: 3.2.33
|
235
153
|
signing_key:
|
236
154
|
specification_version: 4
|
237
155
|
summary: A Redis client library.
|
metadata.gz.sig
ADDED
Binary file
|