Class: Fabric::ClientStub
- Inherits:
-
Object
- Object
- Fabric::ClientStub
- Defined in:
- lib/fabric/client_stub.rb
Constant Summary collapse
- VALID_OPTIONS_KEYS =
%i[channel_override timeout propagate_mask channel_args interceptors]
Instance Attribute Summary collapse
-
#creds ⇒ Object
readonly
Returns the value of attribute creds.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(host, creds, options = {}) ⇒ ClientStub
constructor
A new instance of ClientStub.
Constructor Details
#initialize(host, creds, options = {}) ⇒ ClientStub
Returns a new instance of ClientStub.
7 8 9 10 11 12 13 14 15 |
# File 'lib/fabric/client_stub.rb', line 7 def initialize(host, creds, = {}) @host = host @logger = [:logger] @creds = GRPC::Core::ChannelCredentials.new(creds) if creds.is_a?(String) @creds ||= :this_channel_is_insecure @options = .slice(*VALID_OPTIONS_KEYS) end |
Instance Attribute Details
#creds ⇒ Object (readonly)
Returns the value of attribute creds.
3 4 5 |
# File 'lib/fabric/client_stub.rb', line 3 def creds @creds end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
3 4 5 |
# File 'lib/fabric/client_stub.rb', line 3 def host @host end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
3 4 5 |
# File 'lib/fabric/client_stub.rb', line 3 def logger @logger end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/fabric/client_stub.rb', line 3 def @options end |