var ( ErrNotFound = errors.New("probing: id not found") ErrExist = errors.New("probing: id exists") )
func NewHandler() http.Handler
type Health struct { OK bool Now time.Time }
type Prober interface { AddHTTP(id string, probingInterval time.Duration, endpoints []string) error Remove(id string) error RemoveAll() Reset(id string) error Status(id string) (Status, error) }
func NewProber(tr http.RoundTripper) Prober
type Status interface { Total() int64 Loss() int64 Health() bool Err() error // Estimated smoothed round trip time SRTT() time.Duration // Estimated clock difference ClockDiff() time.Duration StopNotify() <-chan struct{} }