Add debug => go-debug

This commit is contained in:
Asim Aslam
2019-05-31 01:22:19 +01:00
parent 95d134b57e
commit f2139e2a16
13 changed files with 1023 additions and 0 deletions

28
debug/health/health.go Normal file
View File

@@ -0,0 +1,28 @@
// Package health is for user defined health checks
package health
type Health interface {
Register([]*Check) error
Read(...ReadOption) ([]*Check, error)
Check(...CheckOption) ([]*Status, error)
String() string
}
type Check struct {
Id string
Metadata map[string]string
Exec func() (*Status, error)
}
type Status struct {
Code int
Detail string
}
type CheckOptions struct{}
type CheckOption func(o *CheckOptions)
type ReadOptions struct{}
type ReadOption func(o *ReadOptions)