ping

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpPing

type HttpPing struct {
	Method string
	URL    string
	IP     netip.Addr
	// contains filtered or unexported fields
}

func NewHttpPing

func NewHttpPing(ip netip.Addr, method, url string, opts *statute.ScannerOptions) *HttpPing

func (*HttpPing) Ping

func (h *HttpPing) Ping() statute.IPingResult

func (*HttpPing) PingContext

func (h *HttpPing) PingContext(ctx context.Context) statute.IPingResult

type HttpPingResult

type HttpPingResult struct {
	AddrPort netip.AddrPort
	Proto    string
	Status   int
	Length   int
	RTT      time.Duration
	Err      error
}

func (*HttpPingResult) Error

func (h *HttpPingResult) Error() error

func (*HttpPingResult) Result

func (h *HttpPingResult) Result() statute.IPInfo

func (*HttpPingResult) String

func (h *HttpPingResult) String() string

type Ping

type Ping struct {
	Options *statute.ScannerOptions
}

func (*Ping) DoPing

func (p *Ping) DoPing(ip netip.Addr) (statute.IPInfo, error)

DoPing performs a ping on the given IP address.

type QuicPing

type QuicPing struct {
	Host string
	Port uint16
	IP   netip.Addr
	// contains filtered or unexported fields
}

func NewQuicPing

func NewQuicPing(ip netip.Addr, host string, port uint16, opts *statute.ScannerOptions) *QuicPing

func (*QuicPing) Ping

func (h *QuicPing) Ping() statute.IPingResult

func (*QuicPing) PingContext

func (h *QuicPing) PingContext(ctx context.Context) statute.IPingResult

type QuicPingResult

type QuicPingResult struct {
	AddrPort    netip.AddrPort
	QUICVersion quic.VersionNumber
	TLSVersion  uint16
	RTT         time.Duration
	Err         error
}

func (*QuicPingResult) Error

func (h *QuicPingResult) Error() error

func (*QuicPingResult) Result

func (h *QuicPingResult) Result() statute.IPInfo

func (*QuicPingResult) String

func (h *QuicPingResult) String() string

type TcpPing

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

func NewTcpPing

func NewTcpPing(ip netip.Addr, host string, port uint16, opts *statute.ScannerOptions) *TcpPing

func (*TcpPing) Host

func (tp *TcpPing) Host() string

func (*TcpPing) Ping

func (tp *TcpPing) Ping() statute.IPingResult

func (*TcpPing) PingContext

func (tp *TcpPing) PingContext(ctx context.Context) statute.IPingResult

func (*TcpPing) SetHost

func (tp *TcpPing) SetHost(host string)

type TcpPingResult

type TcpPingResult struct {
	AddrPort netip.AddrPort
	RTT      time.Duration
	Err      error
}

func (*TcpPingResult) Error

func (tp *TcpPingResult) Error() error

func (*TcpPingResult) Result

func (tp *TcpPingResult) Result() statute.IPInfo

func (*TcpPingResult) String

func (tp *TcpPingResult) String() string

type TlsPing

type TlsPing struct {
	Host string
	Port uint16
	IP   netip.Addr
	// contains filtered or unexported fields
}

func NewTlsPing

func NewTlsPing(ip netip.Addr, host string, port uint16, opts *statute.ScannerOptions) *TlsPing

func (*TlsPing) Ping

func (t *TlsPing) Ping() statute.IPingResult

func (*TlsPing) PingContext

func (t *TlsPing) PingContext(ctx context.Context) statute.IPingResult

type TlsPingResult

type TlsPingResult struct {
	AddrPort   netip.AddrPort
	TLSVersion uint16
	RTT        time.Duration
	Err        error
}

func (*TlsPingResult) Error

func (t *TlsPingResult) Error() error

func (*TlsPingResult) Result

func (t *TlsPingResult) Result() statute.IPInfo

func (*TlsPingResult) String

func (t *TlsPingResult) String() string

type WarpPing

type WarpPing struct {
	PrivateKey    string
	PeerPublicKey string
	PresharedKey  string
	IP            netip.Addr
	// contains filtered or unexported fields
}

func NewWarpPing

func NewWarpPing(ip netip.Addr, opts *statute.ScannerOptions) *WarpPing

func (*WarpPing) Ping

func (h *WarpPing) Ping() statute.IPingResult

func (*WarpPing) PingContext

func (h *WarpPing) PingContext(_ context.Context) statute.IPingResult

type WarpPingResult

type WarpPingResult struct {
	AddrPort netip.AddrPort
	RTT      time.Duration
	Err      error
}

func (*WarpPingResult) Error

func (h *WarpPingResult) Error() error

func (*WarpPingResult) Result

func (h *WarpPingResult) Result() statute.IPInfo

func (*WarpPingResult) String

func (h *WarpPingResult) String() string

Jump to

Keyboard shortcuts

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