2ef399b315
The implementation relies on nats.io Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
12 lines
182 B
Go
12 lines
182 B
Go
package execution
|
|
|
|
type Supervisor struct {
|
|
}
|
|
|
|
type waiter interface {
|
|
Wait() (uint32, error)
|
|
}
|
|
|
|
func (s *Supervisor) Monitor(w waiter, cb func(uint32, error)) {
|
|
go cb(w.Wait())
|
|
}
|