CheckNetwork FIXME ...
(host, port string, timeout time.Duration)
| 38 | |
| 39 | // CheckNetwork FIXME ... |
| 40 | func CheckNetwork(host, port string, timeout time.Duration) errors.Error { |
| 41 | var target = fmt.Sprintf("%s:%s", host, port) |
| 42 | _, err := net.DialTimeout("tcp", target, timeout) |
| 43 | if err != nil { |
| 44 | return errors.Convert(err) |
| 45 | } |
| 46 | return nil |
| 47 | } |
| 48 | |
| 49 | // ResolvePort FIXME ... |
| 50 | func ResolvePort(port string, schema string) (string, errors.Error) { |