httpcheck

package
v0.0.0-...-d0d2c37 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTPTimeout   = 500 * time.Millisecond
	HTTPKeepAlive = 60 * time.Second
)

Variables

View Source
var ErrCheckFailed = errors.New("check failed")

Functions

This section is empty.

Types

type Checker

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

func NewChecker

func NewChecker(cfg *CheckerConfig) (*Checker, error)

func (*Checker) IsBlocked

func (c *Checker) IsBlocked(ctx context.Context, fqdn, ip string, ipKind dnssrv.IPKind) (bool, error)

type CheckerConfig

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

func NewCheckerConfig

func NewCheckerConfig() *CheckerConfig

func (*CheckerConfig) Build

func (c *CheckerConfig) Build() *CheckerConfig

func (*CheckerConfig) Validate

func (c *CheckerConfig) Validate() error

func (*CheckerConfig) WithDirectDev

func (c *CheckerConfig) WithDirectDev(dev string) *CheckerConfig

func (*CheckerConfig) WithVPNDev

func (c *CheckerConfig) WithVPNDev(dev string) *CheckerConfig

type LocalResolver

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

func NewLocalResolver

func NewLocalResolver() *LocalResolver

func (*LocalResolver) Add

func (l *LocalResolver) Add(fqdn, addr string) string

func (*LocalResolver) Del

func (l *LocalResolver) Del(fqdn string)

func (*LocalResolver) Lookup

func (l *LocalResolver) Lookup(fqdn string) (string, bool)

Jump to

Keyboard shortcuts

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