コード例 #1
0
ファイル: notifier.go プロジェクト: kinvolk/clair
// 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
}
コード例 #2
0
ファイル: database.go プロジェクト: kinvolk/clair
func init() {
	health.RegisterHealthchecker("database", Healthcheck)
}