package health import ( "fmt" "net" "time" ) // Probe attempts a TCP connection to host:port and returns true if reachable. func Probe(host string, port int32) bool { addr := fmt.Sprintf("%s:%d", host, port) conn, err := net.DialTimeout("tcp", addr, 3*time.Second) if err != nil { return false } conn.Close() return true }