Provide a way to stop it
Closed this issue · 2 comments
mcasimir commented
Awesome lib.
It would be very useful to have a clean way to stop it, especially for integration testing.
Without much changes in the interface could be something like this:
let stopMonitor = monitor(callbacks);
a bit cleaner but requires breaking changes:
let monitor = new Monitor(dockerConfig);
monitor.on('container:start', fn);
monitor.on('container:stop', fn);
monitor.start();
monitor.stop();
Beh01der commented
I've implemented it in 1.0.10
let m = monitor(callbacks);
m.stop();
I've also added 2 extra callback methods:
- onMonitorStarted
- onMonitorStopped
To start monitoring after stopping, you need to call monitor again
let m = monitor(callbacks);
mcasimir commented
Awesome, thanks
Il gio 28 lug 2016, 08:52 Andrey Chausenko notifications@github.com ha
scritto:
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAUcIVVvcuLMiGhJ2I8e0ExLgyDOn_Qhks5qaFG-gaJpZM4JD8-R
.