// NewHTTPNotifier initializes a new HTTPNotifier func NewHTTPNotifier(URL string) (*HTTPNotifier, error) { if _, err := url.Parse(URL); err != nil { return nil, cerrors.NewBadRequestError("could not create a notifier with an invalid URL") } notifier := &HTTPNotifier{url: URL} health.RegisterHealthchecker("notifier", notifier.Healthcheck) return notifier, nil }
func init() { health.RegisterHealthchecker("database", Healthcheck) }