Class: LogStashLogger::Device::Kafka::TLSConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash-logger/device/kafka.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_certObject (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_certObject (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_keyObject (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_bundleObject



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

Returns:

  • (Boolean)


21
22
23
# File 'lib/logstash-logger/device/kafka.rb', line 21

def invalid?
  !valid?
end

#valid?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/logstash-logger/device/kafka.rb', line 17

def valid?
  all_cert_params? || no_cert_params?
end