Class: EventStoreClient::GRPC::Shared::Streams::ProcessResponse

Inherits:
Object
  • Object
show all
Includes:
Configuration
Defined in:
lib/event_store_client/adapters/grpc/shared/streams/process_response.rb

Instance Method Summary collapse

Methods included from Configuration

#config

Instance Method Details

#call(response, skip_deserialization, skip_decryption) ⇒ Dry::Monads::Success, ...

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Returns:

  • (Dry::Monads::Success, Dry::Monads::Failure, nil)


16
17
18
19
20
21
22
23
24
# File 'lib/event_store_client/adapters/grpc/shared/streams/process_response.rb', line 16

def call(response, skip_deserialization, skip_decryption)
  return Failure(:stream_not_found) if response.stream_not_found
  return Success(response) if skip_deserialization
  return unless response.event&.event

  Success(
    config.mapper.deserialize(response.event.event, skip_decryption: skip_decryption)
  )
end