Class: Async::Container::Notify::Client
- Inherits:
-
Object
- Object
- Async::Container::Notify::Client
- Defined in:
- lib/async/container/notify/client.rb
Instance Method Summary collapse
-
#error!(text, **message) ⇒ Object
Notify the parent controller of an error condition.
-
#ready!(**message) ⇒ Object
Notify the parent controller that the child has become ready, with a brief status message.
-
#reloading!(**message) ⇒ Object
Notify the parent controller that the child is reloading.
-
#restarting!(**message) ⇒ Object
Notify the parent controller that the child is restarting.
-
#status!(text) ⇒ Object
Notify the parent controller of a status change.
-
#stopping!(**message) ⇒ Object
Notify the parent controller that the child is stopping.
Instance Method Details
#error!(text, **message) ⇒ Object
Notify the parent controller of an error condition.
71 72 73 |
# File 'lib/async/container/notify/client.rb', line 71 def error!(text, **) send(status: text, **) end |
#ready!(**message) ⇒ Object
Notify the parent controller that the child has become ready, with a brief status message.
30 31 32 |
# File 'lib/async/container/notify/client.rb', line 30 def ready!(**) send(ready: true, **) end |
#reloading!(**message) ⇒ Object
Notify the parent controller that the child is reloading.
36 37 38 39 40 41 42 |
# File 'lib/async/container/notify/client.rb', line 36 def reloading!(**) [:ready] = false [:reloading] = true [:status] ||= "Reloading..." send(**) end |
#restarting!(**message) ⇒ Object
Notify the parent controller that the child is restarting.
46 47 48 49 50 51 52 |
# File 'lib/async/container/notify/client.rb', line 46 def restarting!(**) [:ready] = false [:reloading] = true [:status] ||= "Restarting..." send(**) end |
#status!(text) ⇒ Object
Notify the parent controller of a status change.
64 65 66 |
# File 'lib/async/container/notify/client.rb', line 64 def status!(text) send(status: text) end |
#stopping!(**message) ⇒ Object
Notify the parent controller that the child is stopping.
56 57 58 59 60 |
# File 'lib/async/container/notify/client.rb', line 56 def stopping!(**) [:stopping] = true send(**) end |