Module: Griffin::Engine::Server
- Defined in:
- lib/griffin/engine/server.rb
Instance Attribute Summary collapse
-
#core ⇒ Object
readonly
Returns the value of attribute core.
-
#socket_manager_path ⇒ Object
readonly
Returns the value of attribute socket_manager_path.
Instance Method Summary collapse
Instance Attribute Details
#core ⇒ Object (readonly)
Returns the value of attribute core.
6 7 8 |
# File 'lib/griffin/engine/server.rb', line 6 def core @core end |
#socket_manager_path ⇒ Object (readonly)
Returns the value of attribute socket_manager_path.
6 7 8 |
# File 'lib/griffin/engine/server.rb', line 6 def socket_manager_path @socket_manager_path end |
Instance Method Details
#before_run ⇒ Object
24 25 26 27 28 |
# File 'lib/griffin/engine/server.rb', line 24 def before_run config[:services].each do |s| @core.handle(s) end end |
#initialize ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/griffin/engine/server.rb', line 8 def initialize @core = Griffin::Server.new( pool_size: config[:pool_size], min_pool_size: config[:min_pool_size], max_pool_size: config[:max_pool_size], min_connection_size: config[:min_connection_size], max_connection_size: config[:max_connection_size], max_receive_message_size: config[:max_receive_message_size], max_send_message_size: config[:max_send_message_size], interceptors: config[:interceptors], settings: config[:http2_settings], ) @socket_manager_path = ServerEngine::SocketManager::Server.generate_path @socket_manager_server = ServerEngine::SocketManager::Server.open(@socket_manager_path) end |
#stop(stop_graceful) ⇒ Object
30 31 32 33 |
# File 'lib/griffin/engine/server.rb', line 30 def stop(stop_graceful) super # needed @socket_manager_server.close end |