health

package
v1.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 13 Imported by: 3

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL