Monitor all services in the monitor

This commit is contained in:
Asim Aslam
2019-08-06 19:02:57 +01:00
parent bc751c55fb
commit eae32176c4
3 changed files with 158 additions and 51 deletions

View File

@@ -15,10 +15,14 @@ type StatusCode int
// Monitor monitors a service and reaps dead instances
type Monitor interface {
// Reap a service and stop monitoring
Reap(service string) error
// Status of the service
Status(service string) (Status, error)
// Watch starts watching the service
Watch(service string) error
// Run the monitor to watch all services
Run() error
// Stop monitoring
Stop() error
}