checker

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Endpoint   endpoint.Endpoint `json:"endpoint"`
	Reachable  bool              `json:"reachable"`
	LatencyMs  int64             `json:"latency_ms"`
	Error      string            `json:"error,omitempty"`
	TLSVersion string            `json:"tls_version,omitempty"`
	TLSCipher  string            `json:"tls_cipher,omitempty"`
	HTTPStatus int               `json:"http_status,omitempty"`
	DNSAddrs   []string          `json:"dns_addrs,omitempty"`
}

func CheckEndpoint

func CheckEndpoint(ctx context.Context, ep endpoint.Endpoint, opts Options) CheckResult

type Options

type Options struct {
	DNS     bool
	HTTP    bool
	TLS     bool
	Timeout time.Duration
}

type Result

type Result struct {
	Address   string
	Reachable bool
	Abused    bool
	Pure      bool
	Latency   int64
}

Legacy Result holds the validation outcome for an endpoint.

func Check

func Check(address string) (*Result, error)

Check performs a backward-compatible TCP connectivity check.

Jump to

Keyboard shortcuts

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