griffin 0.2.4 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/griffin.gemspec +1 -1
- data/lib/griffin/engine/server.rb +2 -0
- data/lib/griffin/engine/single.rb +2 -0
- data/lib/griffin/server.rb +11 -2
- data/lib/griffin/server_config_builder.rb +11 -0
- data/lib/griffin/version.rb +1 -1
- metadata +8 -10
- data/.ruby-version +0 -1
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa72d1f7851dc5a90fb99214c57e9bbba2fd6da6e84225a2ea6955d9ad89f872
|
4
|
+
data.tar.gz: 2794b9f846099b958fb5b937fcf8de2168a858bad149a89316664f9c3b921d75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 731a0d9ab4fba6a3989ef0af62bb4a36f1bd34f48bb0790ff4f5d0c954ee8fa5e0492f4d4f65121ff7378d90fea313333feb262ed4575d4a5c355fb03ae35f28
|
7
|
+
data.tar.gz: 0bded1160bf1b33b16a11e6dea2c95c8abc3311695c4947031dfddb918a5d0292cca809e8797a5b06e1b25e4a8d6e0f88c9467543549539378a079b552c83eff
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ Griffin::Server.configure do |c|
|
|
43
43
|
|
44
44
|
c.services GreeterServer.new
|
45
45
|
|
46
|
-
c.
|
46
|
+
c.workers 2 # A number of worker process
|
47
47
|
end
|
48
48
|
|
49
49
|
Griffin::Server.run
|
@@ -62,7 +62,7 @@ bundle install
|
|
62
62
|
|
63
63
|
## Contributing
|
64
64
|
|
65
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
65
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/cookpad/griffin.
|
66
66
|
|
67
67
|
## License
|
68
68
|
|
data/griffin.gemspec
CHANGED
@@ -28,6 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency 'rspec'
|
29
29
|
spec.add_development_dependency 'rubocop'
|
30
30
|
|
31
|
-
spec.add_dependency 'grpc_kit', '>= 0.
|
31
|
+
spec.add_dependency 'grpc_kit', '>= 0.5.0'
|
32
32
|
spec.add_dependency 'serverengine', '~> 2.0.7'
|
33
33
|
end
|
@@ -12,6 +12,8 @@ module Griffin
|
|
12
12
|
max_pool_size: config[:max_pool_size],
|
13
13
|
min_connection_size: config[:min_connection_size],
|
14
14
|
max_connection_size: config[:max_connection_size],
|
15
|
+
max_receive_message_size: config[:max_receive_message_size],
|
16
|
+
max_send_message_size: config[:max_send_message_size],
|
15
17
|
interceptors: config[:interceptors],
|
16
18
|
settings: config[:http2_settings],
|
17
19
|
)
|
@@ -11,6 +11,8 @@ module Griffin
|
|
11
11
|
max_pool_size: config[:max_pool_size],
|
12
12
|
min_connection_size: config[:min_connection_size],
|
13
13
|
max_connection_size: config[:max_connection_size],
|
14
|
+
max_receive_message_size: config[:max_receive_message_size],
|
15
|
+
max_send_message_size: config[:max_send_message_size],
|
14
16
|
interceptors: config[:interceptors],
|
15
17
|
)
|
16
18
|
new(serv, config)
|
data/lib/griffin/server.rb
CHANGED
@@ -42,10 +42,19 @@ module Griffin
|
|
42
42
|
# @param max_connection_size [Integer] Minimum connection of TCP
|
43
43
|
# @param interceptors [Array<GrpcKit::GRPC::ServerInterceptor>] list of interceptors
|
44
44
|
# @param settings [Array<DS9::Settings,Integer>] list of HTTP2-Settings headers
|
45
|
-
|
45
|
+
# @param max_receive_message_size [Integer, nil] Specify the default maximum size of inbound message in bytes. Default to 4MB.
|
46
|
+
# @param max_send_message_size [Integer, nil] Specify the default maximum size of outbound message in bytes. Default to 4MB.
|
47
|
+
def initialize(min_pool_size:, max_pool_size:, min_connection_size:, max_connection_size:, interceptors: [], settings: [], max_receive_message_size: nil, max_send_message_size: nil, **opts)
|
46
48
|
@min_connection_size = min_connection_size
|
47
49
|
@max_connection_size = max_connection_size
|
48
|
-
@server = GrpcKit::Server.new(
|
50
|
+
@server = GrpcKit::Server.new(
|
51
|
+
interceptors: interceptors,
|
52
|
+
min_pool_size: min_pool_size,
|
53
|
+
max_pool_size: max_pool_size,
|
54
|
+
max_receive_message_size: max_receive_message_size,
|
55
|
+
max_send_message_size: max_send_message_size,
|
56
|
+
settings: settings
|
57
|
+
)
|
49
58
|
@opts = opts
|
50
59
|
@status = :run
|
51
60
|
@worker_id = 0
|
@@ -16,6 +16,8 @@ module Griffin
|
|
16
16
|
:min_pool_size,
|
17
17
|
:max_connection_size,
|
18
18
|
:min_connection_size,
|
19
|
+
:max_receive_message_size,
|
20
|
+
:max_send_message_size,
|
19
21
|
:http2_settings,
|
20
22
|
].freeze
|
21
23
|
|
@@ -82,6 +84,15 @@ module Griffin
|
|
82
84
|
@opts[:services].concat(value).flatten!
|
83
85
|
end
|
84
86
|
|
87
|
+
def max_receive_message_size(value)
|
88
|
+
@opts[:max_receive_message_size] = Integer(value)
|
89
|
+
end
|
90
|
+
|
91
|
+
def max_send_message_size(value)
|
92
|
+
@opts[:max_send_message_size] = Integer(value)
|
93
|
+
end
|
94
|
+
|
95
|
+
|
85
96
|
def build
|
86
97
|
c = ServerConfig.new
|
87
98
|
@opts.each do |name, value|
|
data/lib/griffin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: griffin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuta Iwama
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.5.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.
|
96
|
+
version: 0.5.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: serverengine
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,8 +118,6 @@ files:
|
|
118
118
|
- ".gitignore"
|
119
119
|
- ".rspec"
|
120
120
|
- ".rubocop.yml"
|
121
|
-
- ".ruby-version"
|
122
|
-
- ".travis.yml"
|
123
121
|
- Gemfile
|
124
122
|
- LICENSE.txt
|
125
123
|
- README.md
|
@@ -158,7 +156,7 @@ homepage: https://github.com/ganmacs/griffin
|
|
158
156
|
licenses:
|
159
157
|
- MIT
|
160
158
|
metadata: {}
|
161
|
-
post_install_message:
|
159
|
+
post_install_message:
|
162
160
|
rdoc_options: []
|
163
161
|
require_paths:
|
164
162
|
- lib
|
@@ -174,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
172
|
- !ruby/object:Gem::Version
|
175
173
|
version: '0'
|
176
174
|
requirements: []
|
177
|
-
rubygems_version: 3.
|
178
|
-
signing_key:
|
175
|
+
rubygems_version: 3.1.4
|
176
|
+
signing_key:
|
179
177
|
specification_version: 4
|
180
178
|
summary: gRPC server and client for Ruby
|
181
179
|
test_files: []
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.5
|