Class: EventStoreClient::GRPC::CommandRegistrar
- Inherits:
-
Object
- Object
- EventStoreClient::GRPC::CommandRegistrar
- Defined in:
- lib/event_store_client/adapters/grpc/command_registrar.rb
Class Method Summary collapse
- .register_request(command_klass, request:) ⇒ Object
- .register_service(command_klass, service:) ⇒ Object
- .request(command_klass) ⇒ Object
-
.service(command_klass) ⇒ Object
GRPC service class.
Class Method Details
.register_request(command_klass, request:) ⇒ Object
8 9 10 11 |
# File 'lib/event_store_client/adapters/grpc/command_registrar.rb', line 8 def self.register_request(command_klass, request:) @commands[command_klass] ||= {} @commands[command_klass][:request] = request end |
.register_service(command_klass, service:) ⇒ Object
13 14 15 16 |
# File 'lib/event_store_client/adapters/grpc/command_registrar.rb', line 13 def self.register_service(command_klass, service:) @commands[command_klass] ||= {} @commands[command_klass][:service] = service end |
.request(command_klass) ⇒ Object
18 19 20 |
# File 'lib/event_store_client/adapters/grpc/command_registrar.rb', line 18 def self.request(command_klass) @commands.dig(command_klass, :request) end |
.service(command_klass) ⇒ Object
Returns GRPC service class.
27 28 29 |
# File 'lib/event_store_client/adapters/grpc/command_registrar.rb', line 27 def self.service(command_klass) @commands.dig(command_klass, :service) end |