Class: Async::Container::Notify::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/async/container/notify/client.rb

Direct Known Subclasses

Console, Pipe, Socket

Instance Method Summary collapse

Instance Method Details

#error!(text, **message) ⇒ Object

Notify the parent controller of an error condition.



54
55
56
# File 'lib/async/container/notify/client.rb', line 54

def error!(text, **message)
	send(status: text, **message)
end

#ready!(**message) ⇒ Object

Notify the parent controller that the child has become ready, with a brief status message.



13
14
15
# File 'lib/async/container/notify/client.rb', line 13

def ready!(**message)
	send(ready: true, **message)
end

#reloading!(**message) ⇒ Object

Notify the parent controller that the child is reloading.



19
20
21
22
23
24
25
# File 'lib/async/container/notify/client.rb', line 19

def reloading!(**message)
	message[:ready] = false
	message[:reloading] = true
	message[:status] ||= "Reloading..."
	
	send(**message)
end

#restarting!(**message) ⇒ Object

Notify the parent controller that the child is restarting.



29
30
31
32
33
34
35
# File 'lib/async/container/notify/client.rb', line 29

def restarting!(**message)
	message[:ready] = false
	message[:reloading] = true
	message[:status] ||= "Restarting..."
	
	send(**message)
end

#status!(text) ⇒ Object

Notify the parent controller of a status change.



47
48
49
# File 'lib/async/container/notify/client.rb', line 47

def status!(text)
	send(status: text)
end

#stopping!(**message) ⇒ Object

Notify the parent controller that the child is stopping.



39
40
41
42
43
# File 'lib/async/container/notify/client.rb', line 39

def stopping!(**message)
	message[:stopping] = true
	
	send(**message)
end