Class: EventStoreClient::GRPC::Commands::Streams::Subscribe
- Includes:
- Configuration
- Defined in:
- lib/event_store_client/adapters/grpc/commands/streams/subscribe.rb
Constant Summary collapse
- StreamNotFound =
Class.new(StandardError)
Instance Method Summary collapse
Methods included from Configuration
Methods inherited from Command
Instance Method Details
#call(options = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/event_store_client/adapters/grpc/commands/streams/subscribe.rb', line 22 def call( = {}) opts = () service.read(request.new(options: opts), metadata: ).map do |res| raise StreamNotFound if res.stream_not_found yield prepared_response(res) if block_given? end rescue StreamNotFound Failure(:not_found) end |