checker

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package checker is a URL based remote server availability checher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TargetChecker

type TargetChecker struct {
	*url.URL
	Timeout time.Duration
	Conn    *bufconn.Conn
	Proxied *url.URL
}

TargetChecker is the struct to check an URL directly or through proxy.

func New

func New(s string, d time.Duration, p string) (*TargetChecker, error)

New generates a new TargetChecker from a URL string.

func NewTargetChecker added in v0.1.6

func NewTargetChecker(u *url.URL, d time.Duration, c *bufconn.Conn, p *url.URL) *TargetChecker

NewTargetChecker packs a new TargetChecker.

func (*TargetChecker) Check

func (ck *TargetChecker) Check() (err error)

Check checks if the target responses succeeded.

func (*TargetChecker) Transfer

func (ck *TargetChecker) Transfer() (err error)

Transfer operates the check communication.

Jump to

Keyboard shortcuts

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