Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appender ¶
type Appender interface { Append(health ApplicationHealth) Iterate(func(health ApplicationHealth) bool) }
Appender appends health checkers
type AppenderImpl ¶
type AppenderImpl struct {
// contains filtered or unexported fields
}
AppenderImpl implementation of interface health.Appender.
func (*AppenderImpl) Append ¶
func (c *AppenderImpl) Append(health ApplicationHealth)
Append adds health checker
func (*AppenderImpl) Iterate ¶
func (c *AppenderImpl) Iterate(f func(health ApplicationHealth) bool)
Iterate accepts function to iterable
type ApplicationHealth ¶
type ApplicationHealth interface {
Check() error
}
ApplicationHealth represents health checker for application
func NewApplicationHealthFunc ¶
func NewApplicationHealthFunc(f func() error) ApplicationHealth
NewApplicationHealthFunc adapt specific func and returns ApplicationHealth
func NewGrpcHealth ¶
func NewGrpcHealth(s *grpc.Server, addr net.Addr, timeout time.Duration, opts ...grpc.DialOption) ApplicationHealth
NewGrpcHealth creates health checker for grpc servers
func NewHTTPServeMuxHealth ¶
func NewHTTPServeMuxHealth(addr net.Addr, mux *http.ServeMux, timeout time.Duration) ApplicationHealth
NewHTTPServeMuxHealth creates health checker for http based applications
Click to show internal directories.
Click to hide internal directories.