Documentation
¶
Overview ¶
Package monitor monitors service health
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotWatching = errors.New("not watching")
)
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor interface {
// Reap a service and stop monitoring
Reap(service string) error
// Check the status of the service now
Check(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
}
Monitor monitors a service and reaps dead instances
type Status ¶
type Status struct {
Code StatusCode
Info string
Error string
}
type StatusCode ¶
type StatusCode int
const ( StatusUnknown StatusCode = iota StatusRunning StatusFailed )
Click to show internal directories.
Click to hide internal directories.