Class: LogStashLogger::Device::Kafka::TLSConfiguration
- Inherits:
-
Object
- Object
- LogStashLogger::Device::Kafka::TLSConfiguration
- Defined in:
- lib/logstash-logger/device/kafka.rb
Instance Attribute Summary collapse
-
#ssl_ca_cert ⇒ Object
readonly
Returns the value of attribute ssl_ca_cert.
-
#ssl_client_cert ⇒ Object
readonly
Returns the value of attribute ssl_client_cert.
-
#ssl_client_cert_key ⇒ Object
readonly
Returns the value of attribute ssl_client_cert_key.
Instance Method Summary collapse
- #cert_bundle ⇒ Object
-
#initialize(opts = {}) ⇒ TLSConfiguration
constructor
A new instance of TLSConfiguration.
- #invalid? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize(opts = {}) ⇒ TLSConfiguration
Returns a new instance of TLSConfiguration.
7 8 9 10 11 |
# File 'lib/logstash-logger/device/kafka.rb', line 7 def initialize(opts = {}) @ssl_ca_cert = opts[:ssl_ca_cert] @ssl_client_cert = opts[:ssl_client_cert] @ssl_client_cert_key = opts[:ssl_client_cert_key] end |
Instance Attribute Details
#ssl_ca_cert ⇒ Object (readonly)
Returns the value of attribute ssl_ca_cert.
5 6 7 |
# File 'lib/logstash-logger/device/kafka.rb', line 5 def ssl_ca_cert @ssl_ca_cert end |
#ssl_client_cert ⇒ Object (readonly)
Returns the value of attribute ssl_client_cert.
5 6 7 |
# File 'lib/logstash-logger/device/kafka.rb', line 5 def ssl_client_cert @ssl_client_cert end |
#ssl_client_cert_key ⇒ Object (readonly)
Returns the value of attribute ssl_client_cert_key.
5 6 7 |
# File 'lib/logstash-logger/device/kafka.rb', line 5 def ssl_client_cert_key @ssl_client_cert_key end |
Instance Method Details
#cert_bundle ⇒ Object
13 14 15 |
# File 'lib/logstash-logger/device/kafka.rb', line 13 def cert_bundle @cert_bundle ||= all_cert_params? ? cert_params_as_hash : {} end |
#invalid? ⇒ Boolean
21 22 23 |
# File 'lib/logstash-logger/device/kafka.rb', line 21 def invalid? !valid? end |
#valid? ⇒ Boolean
17 18 19 |
# File 'lib/logstash-logger/device/kafka.rb', line 17 def valid? all_cert_params? || no_cert_params? end |