Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputePerfStats ¶
func ComputePerfStats(latencies, throughputs []float64) (madmin.NetLatency, madmin.NetThroughput, error)
ComputePerfStats takes arrays of Latency & Throughput to compute Statistics
func IsConnRefusedErr ¶ added in v1.7.0
IsConnRefusedErr - Checks for "connection refused" errors.
func IsConnResetErr ¶ added in v1.7.0
IsConnResetErr - Checks for "connection reset" errors.
func IsNetworkOrHostDown ¶
IsNetworkOrHostDown - if there was a network error or if the host is down. expectTimeouts indicates that *context* timeouts are expected and does not indicate a downed host. Other timeouts still returns down.
Types ¶
type Host ¶
Host - holds network host IP/name and its port.
func (Host) MarshalJSON ¶
MarshalJSON - converts Host into JSON data
func (*Host) UnmarshalJSON ¶
UnmarshalJSON - parses data into Host.
type Port ¶
type Port uint16
Port - network port
func GetFreePort ¶
GetFreePort asks the kernel for a free open port that is ready to use.
type URL ¶
URL - improved JSON friendly url.URL.
func ParseHTTPURL ¶
ParseHTTPURL - parses a string into HTTP URL, string is expected to be of form http:// or https://
func (URL) Hostname ¶ added in v1.1.23
Hostname returns u.Host, stripping any valid port number if present
If the result is enclosed in square brackets, as literal IPv6 addresses are, the square brackets are removed from the result.
func (URL) MarshalJSON ¶
MarshalJSON - converts to JSON string data.
func (URL) Port ¶ added in v1.1.23
Port returns the port part of u.Host, without the leading colon.
If u.Host doesn't contain a valid numeric port, Port returns an empty string.
func (*URL) UnmarshalJSON ¶
UnmarshalJSON - parses given data into URL.