// CheckHealth runs the service's health command, returning the results func (s *Service) CheckHealth() error { // if we have a valid Service but there's no health check // set, assume it always passes (ex. telemetry service). if s.healthCheckCmd == nil { return nil } return commands.RunWithTimeout(s.healthCheckCmd, log.Fields{ "process": "health", "serviceName": s.Name, "serviceID": s.ID}) }
// OnChange runs the backend's onChange command, returning the results func (b *Backend) OnChange() error { return commands.RunWithTimeout(b.onChangeCmd, log.Fields{ "process": "onChange", "backend": b.Name}) }
// PollAction runs the task func (t *Task) PollAction() { fields := log.Fields{"process": "task", "task": t.Name} commands.RunWithTimeout(t.cmd, fields) }