anycable-core 1.5.0.rc.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/anycable/grpc/config.rb +9 -1
- data/lib/anycable/socket.rb +13 -0
- data/lib/anycable/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51822ff8e8b07d8967dfaeed99b65c45e7cf8a2d3868f94f09dd81a26d934bd8
|
4
|
+
data.tar.gz: d782bdda587a181716bd0d6dc0aa19d0a6c24b0236b0cb3aa3354100364839a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2f48cae19656f6b3360f8173a76d91ec2e6bf87434c7b8ccc00e3fae5dd3f89542f8d545348944b2eee90068833cc74fbf33be929885eb0427c019f9a0c9ba1
|
7
|
+
data.tar.gz: 00a17dedd9dd6f572aca18fe08f77d5d234c5b5636497f2b925b5dafbb230c4b918d4a4fa5a020d1adb612d9c11528554579e9ec81589b336081792249029a3d
|
data/CHANGELOG.md
CHANGED
data/lib/anycable/grpc/config.rb
CHANGED
@@ -35,7 +35,15 @@ module AnyCable
|
|
35
35
|
poll_period: rpc_poll_period,
|
36
36
|
pool_keep_alive: rpc_pool_keep_alive,
|
37
37
|
tls_credentials: tls_credentials,
|
38
|
-
server_args: enhance_grpc_server_args(normalized_grpc_server_args)
|
38
|
+
server_args: enhance_grpc_server_args(normalized_grpc_server_args).tap do |sargs|
|
39
|
+
# Provide keepalive defaults unless explicitly set.
|
40
|
+
# They must MATCH the corresponding Go client defaults:
|
41
|
+
# https://github.com/anycable/anycable-go/blob/62e77e7f759aa9253c2bd23812dd59ec8471db86/rpc/rpc.go#L512-L515
|
42
|
+
#
|
43
|
+
# See also https://github.com/grpc/grpc/blob/master/doc/keepalive.md and https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
|
44
|
+
sargs["grpc.keepalive_permit_without_calls"] ||= 1
|
45
|
+
sargs["grpc.http2.min_recv_ping_interval_without_data_ms"] ||= 10_000
|
46
|
+
end
|
39
47
|
}
|
40
48
|
end
|
41
49
|
|
data/lib/anycable/socket.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module AnyCable
|
4
|
+
WHISPER_KEY = "$w"
|
5
|
+
|
4
6
|
# Socket mock to be used with application connection
|
5
7
|
class Socket
|
6
8
|
# Represents the per-connection store
|
@@ -59,10 +61,21 @@ module AnyCable
|
|
59
61
|
|
60
62
|
def unsubscribe(_channel, broadcasting)
|
61
63
|
streams[:stop] << broadcasting
|
64
|
+
|
65
|
+
if istate.read(WHISPER_KEY) == broadcasting
|
66
|
+
istate.write(WHISPER_KEY, "")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def whisper(_channel, broadcasting)
|
71
|
+
istate.write(WHISPER_KEY, broadcasting)
|
62
72
|
end
|
63
73
|
|
64
74
|
def unsubscribe_from_all(_channel)
|
65
75
|
@stop_all_streams = true
|
76
|
+
if istate.read(WHISPER_KEY)
|
77
|
+
istate.write(WHISPER_KEY, "")
|
78
|
+
end
|
66
79
|
end
|
67
80
|
|
68
81
|
def streams
|
data/lib/anycable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.0
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anyway_config
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: google-protobuf
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3.
|
33
|
+
version: '3.25'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3.
|
40
|
+
version: '3.25'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: redis
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -288,9 +288,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
288
288
|
version: 2.7.0
|
289
289
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
290
290
|
requirements:
|
291
|
-
- - "
|
291
|
+
- - ">="
|
292
292
|
- !ruby/object:Gem::Version
|
293
|
-
version:
|
293
|
+
version: '0'
|
294
294
|
requirements: []
|
295
295
|
rubygems_version: 3.4.20
|
296
296
|
signing_key:
|