Class: Karafka::Instrumentation::Vendors::Kubernetes::BaseListener
- Inherits:
-
Object
- Object
- Karafka::Instrumentation::Vendors::Kubernetes::BaseListener
- Includes:
- Core::Helpers::Time
- Defined in:
- lib/karafka_ext/k8s.rb
Overview
Base Kubernetes Listener providing basic HTTP server capabilities to respond with health
Direct Known Subclasses
Instance Method Summary collapse
-
#healthy? ⇒ Boolean
True if all good, false if we should tell k8s to kill this process.
-
#initialize(hostname: nil, port: 4000, logger: ActiveSupport::Logger.new(STDOUT)) ⇒ BaseListener
constructor
A new instance of BaseListener.
Constructor Details
#initialize(hostname: nil, port: 4000, logger: ActiveSupport::Logger.new(STDOUT)) ⇒ BaseListener
Returns a new instance of BaseListener.
22 23 24 25 26 27 28 29 30 |
# File 'lib/karafka_ext/k8s.rb', line 22 def initialize( hostname: nil, port: 4000, logger: ActiveSupport::Logger.new(STDOUT) ) @hostname = hostname @port = port @logger = logger end |
Instance Method Details
#healthy? ⇒ Boolean
Returns true if all good, false if we should tell k8s to kill this process.
33 34 35 |
# File 'lib/karafka_ext/k8s.rb', line 33 def healthy? raise NotImplementedError, 'Implement in a subclass' end |