ping

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrEmpty   = errs.Kind("empty")
	ErrInvalid = errs.Kind("invalid")

	ErrURL = errs.Entity("URL")
)

Variables

View Source
var (
	ErrEmptyURL   = errs.WithDomain(errDomain, ErrEmpty, ErrURL)
	ErrInvalidURL = errs.WithDomain(errDomain, ErrInvalid, ErrURL)
)

Functions

func WithTimeout

func WithTimeout(dur time.Duration) cfg.Option[Config]

func WithURL

func WithURL(url string) cfg.Option[Config]

Types

type Checker

type Checker struct {
	// contains filtered or unexported fields
}

func NewChecker

func NewChecker(options ...cfg.Option[Config]) (*Checker, error)

func (*Checker) Up

func (c *Checker) Up(ctx context.Context) (bool, error)

type Config

type Config struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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