anycable-rack-server 0.2.0 → 0.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/README.md +1 -1
- data/lib/anycable/rack/connection.rb +2 -1
- data/lib/anycable/rack/rpc/client.rb +10 -2
- data/lib/anycable/rack/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: 0515017e6e7f746e09105d2feb3fdbbcad873c406ad0e4c3d11ae109eb952b26
|
|
4
|
+
data.tar.gz: fda34861fae7508fc64a1321d2346bd1ed47f5cce1d71044b4ef3b2d2d36e06b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e82a0ddf031e13515d9d8df0a645f8aea5ab1c59241ffd3b9202906cca1c6c4b05393a2e51685e28da1e27a702d41f26a14fdb8d32bcf5ec42e9773b404348d
|
|
7
|
+
data.tar.gz: 1e0d334e324695a6b583be61da56bc28a40dd030aef7f8c35941085c0dea7cbb963fdd2da115adafac6d2459b3dc4951909c417433371577343d28c609928fb5
|
data/README.md
CHANGED
|
@@ -74,7 +74,7 @@ config.any_cable_rack.rpc_port = 50051
|
|
|
74
74
|
|
|
75
75
|
## Broadcast adapters
|
|
76
76
|
|
|
77
|
-
AnyCable Rack supports Redis (default) and HTTP broadcast adapters (see [the documentation](https://docs.anycable.io
|
|
77
|
+
AnyCable Rack supports Redis (default) and HTTP broadcast adapters (see [the documentation](https://docs.anycable.io/#/ruby/broadcast_adapters)).
|
|
78
78
|
|
|
79
79
|
Broadcast adapter is inherited from AnyCable configuration (so, you don't need to configure it twice).
|
|
80
80
|
|
|
@@ -42,20 +42,28 @@ module AnyCable
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
def disconnect(identifiers:, subscriptions:, headers:, url:, state: nil)
|
|
45
|
+
def disconnect(identifiers:, subscriptions:, headers:, url:, state: nil, channels_state: nil)
|
|
46
46
|
request = DisconnectRequest.new(
|
|
47
47
|
identifiers: identifiers,
|
|
48
48
|
subscriptions: subscriptions,
|
|
49
49
|
env: Env.new(
|
|
50
50
|
headers: headers,
|
|
51
51
|
url: url,
|
|
52
|
-
cstate: state
|
|
52
|
+
cstate: state,
|
|
53
|
+
istate: encode_istate(channels_state)
|
|
53
54
|
)
|
|
54
55
|
)
|
|
55
56
|
pool.with do |stub|
|
|
56
57
|
stub.disconnect(request, metadata)
|
|
57
58
|
end
|
|
58
59
|
end
|
|
60
|
+
|
|
61
|
+
private
|
|
62
|
+
|
|
63
|
+
# We need a string -> string Hash here
|
|
64
|
+
def encode_istate(state)
|
|
65
|
+
state.transform_values(&:to_json)
|
|
66
|
+
end
|
|
59
67
|
end
|
|
60
68
|
end
|
|
61
69
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anycable-rack-server
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yulia Oletskaya
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: anyway_config
|