// New creates Prober. func New() Prober { … } type Prober … type tcpProber … // Probe checks that a TCP connection to the address can be opened. func (pr tcpProber) Probe(host string, port int, timeout time.Duration) (probe.Result, string, error) { … } // DoTCPProbe checks that a TCP socket to the address can be opened. // If the socket can be opened, it returns Success // If the socket fails to open, it returns Failure. // This is exported because some other packages may want to do direct TCP probes. func DoTCPProbe(addr string, timeout time.Duration) (probe.Result, string, error) { … }