grpc_kit 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grpc_kit/server.rb +3 -2
- data/lib/grpc_kit/stream/server_stream.rb +2 -2
- data/lib/grpc_kit/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3f6a4fd2a91147cff769dd23571866ac34f66bf33593613b9f2613668d4355b
|
4
|
+
data.tar.gz: 29a45c2bc3ce024445b18ce227746bb30fe6166e94534d2a6ae56d70f2622154
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b213760e331baf56a58867b3f141d457ef9a55f1994cb6419fc0efc6d262b92b07797d43ec6aec58ebe2401b8ae0dca29f265ae47189ab884efec5766e7a565c
|
7
|
+
data.tar.gz: 3680f1df197df31e2ada1ad36ef942b3c5eed8d6e427694d16000493bde2b81c028517080c754944fc5e176edd0572b24f440d9d8492cc3378e9ed5862aec55b
|
data/lib/grpc_kit/server.rb
CHANGED
@@ -10,7 +10,7 @@ module GrpcKit
|
|
10
10
|
# @param shutdown_timeout [Integer] Number of seconds to wait for the server shutdown
|
11
11
|
# @param min_pool_size [Integer] A mininum thread pool size
|
12
12
|
# @param max_pool_size [Integer] A maximum thread pool size
|
13
|
-
def initialize(interceptors: [], shutdown_timeout: 30, min_pool_size: nil, max_pool_size: nil)
|
13
|
+
def initialize(interceptors: [], shutdown_timeout: 30, min_pool_size: nil, max_pool_size: nil, settings: [])
|
14
14
|
@interceptors = interceptors
|
15
15
|
@shutdown_timeout = shutdown_timeout
|
16
16
|
@min_pool_size = min_pool_size || GrpcKit::RpcDispatcher::DEFAULT_MIN
|
@@ -19,6 +19,7 @@ module GrpcKit
|
|
19
19
|
@rpc_descs = {}
|
20
20
|
@mutex = Mutex.new
|
21
21
|
@stopping = false
|
22
|
+
@settings = settings
|
22
23
|
|
23
24
|
GrpcKit.logger.debug("Launched grpc_kit(v#{GrpcKit::VERSION})")
|
24
25
|
end
|
@@ -47,7 +48,7 @@ module GrpcKit
|
|
47
48
|
raise 'Stopping server' if @stopping
|
48
49
|
|
49
50
|
establish_session(conn) do |s|
|
50
|
-
s.submit_settings(
|
51
|
+
s.submit_settings(@settings)
|
51
52
|
s.start
|
52
53
|
end
|
53
54
|
end
|
@@ -15,10 +15,10 @@ module GrpcKit
|
|
15
15
|
def invoke(rpc)
|
16
16
|
rpc.invoke(self, metadata: @transport.recv_headers.metadata)
|
17
17
|
rescue GrpcKit::Errors::BadStatus => e
|
18
|
-
GrpcKit.logger.
|
18
|
+
GrpcKit.logger.warn(e)
|
19
19
|
send_status(status: e.code, msg: e.reason, metadata: {}) # TODO: metadata should be set
|
20
20
|
rescue StandardError => e
|
21
|
-
GrpcKit.logger.
|
21
|
+
GrpcKit.logger.warn(e)
|
22
22
|
send_status(status: GrpcKit::StatusCodes::UNKNOWN, msg: e.message, metadata: {})
|
23
23
|
end
|
24
24
|
|
data/lib/grpc_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grpc_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuta Iwama
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ds9
|
@@ -252,8 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
252
|
- !ruby/object:Gem::Version
|
253
253
|
version: '0'
|
254
254
|
requirements: []
|
255
|
-
|
256
|
-
rubygems_version: 2.7.6
|
255
|
+
rubygems_version: 3.0.4
|
257
256
|
signing_key:
|
258
257
|
specification_version: 4
|
259
258
|
summary: A kit for creating gRPC server/client
|