Class: Momento::TransportStrategy
- Inherits:
-
Object
- Object
- Momento::TransportStrategy
- Defined in:
- lib/momento/config/transport/transport_strategy.rb
Overview
Low-level gRPC settings for communication with the Momento server
Direct Known Subclasses
Instance Attribute Summary collapse
-
#grpc_configuration ⇒ Object
readonly
Returns the value of attribute grpc_configuration.
Instance Method Summary collapse
-
#initialize(grpc_configuration) ⇒ TransportStrategy
constructor
A new instance of TransportStrategy.
- #with_grpc_configuration(grpc_configuration) ⇒ Object
Constructor Details
#initialize(grpc_configuration) ⇒ TransportStrategy
Returns a new instance of TransportStrategy.
10 11 12 13 14 |
# File 'lib/momento/config/transport/transport_strategy.rb', line 10 def initialize(grpc_configuration) @grpc_configuration = grpc_configuration rescue StandardError raise Momento::Error::InvalidArgumentError, 'invalid gRPC configuration' end |
Instance Attribute Details
#grpc_configuration ⇒ Object (readonly)
Returns the value of attribute grpc_configuration.
4 5 6 |
# File 'lib/momento/config/transport/transport_strategy.rb', line 4 def grpc_configuration @grpc_configuration end |
Instance Method Details
#with_grpc_configuration(grpc_configuration) ⇒ Object
6 7 8 |
# File 'lib/momento/config/transport/transport_strategy.rb', line 6 def with_grpc_configuration(grpc_configuration) return TransportStrategy.new(grpc_configuration) end |