Class: Karafka::Instrumentation::Vendors::Kubernetes::BaseListener
- Inherits:
-
Object
- Object
- Karafka::Instrumentation::Vendors::Kubernetes::BaseListener
- Includes:
- Core::Helpers::Time
- Defined in:
- lib/karafka/instrumentation/vendors/kubernetes/base_listener.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: 3000) ⇒ BaseListener
constructor
A new instance of BaseListener.
Constructor Details
#initialize(hostname: nil, port: 3000) ⇒ BaseListener
Returns a new instance of BaseListener.
24 25 26 27 28 29 30 |
# File 'lib/karafka/instrumentation/vendors/kubernetes/base_listener.rb', line 24 def initialize( hostname: nil, port: 3000 ) @hostname = hostname @port = port 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/instrumentation/vendors/kubernetes/base_listener.rb', line 33 def healthy? raise NotImplementedError, 'Implement in a subclass' end |