tcp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, exec Exec, host string, port int) error

Connect checks TCP reachability to host:port via nc or /dev/tcp.

func ParseHostPort

func ParseHostPort(target string) (host string, port int, err error)

ParseHostPort splits "host:port" (IPv6 bracket form supported loosely).

Types

type Exec

type Exec func(ctx context.Context, cmd []string) (output string, exitCode int, err error)

Exec runs a command in the probe context.

Jump to

Keyboard shortcuts

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