Class: GlooIngressAdapter::ResourceObserver::ObserverThread
- Inherits:
-
Thread
- Object
- Thread
- GlooIngressAdapter::ResourceObserver::ObserverThread
- Defined in:
- lib/gloo_ingress_adapter/resource_observer.rb
Overview
Thread running an observer
Instance Attribute Summary collapse
-
#observer ⇒ Object
readonly
Returns the value of attribute observer.
Instance Method Summary collapse
- #finish ⇒ Object
-
#initialize(observer:, queue:) ⇒ ObserverThread
constructor
A new instance of ObserverThread.
Constructor Details
#initialize(observer:, queue:) ⇒ ObserverThread
Returns a new instance of ObserverThread.
12 13 14 15 16 17 18 19 |
# File 'lib/gloo_ingress_adapter/resource_observer.rb', line 12 def initialize(observer:, queue:) @observer = observer super { observer.watch(queue:) } self.abort_on_exception = true self.name = "observer-#{observer.kind}" end |
Instance Attribute Details
#observer ⇒ Object (readonly)
Returns the value of attribute observer.
10 11 12 |
# File 'lib/gloo_ingress_adapter/resource_observer.rb', line 10 def observer @observer end |
Instance Method Details
#finish ⇒ Object
21 22 23 |
# File 'lib/gloo_ingress_adapter/resource_observer.rb', line 21 def finish observer.watcher.finish end |