# Functions
CaptureHost takes a host:port and returns the host.
CheckHostnameIPMismatch checks for a hostname/IP mismatch in a map of hosts to host:ports.
CheckLocalMissing checks a slice of host:ports for the given local host:port, return an error if not found, otherwise nil.
HostPortsByHost parses a list of host/port conbinations and creates a map of unique hosts each containing a slice of the hostsport instances for each host.
Min returns the lowest integer and is defined because golang only has a min function for floats and not for ints.
MS returns the number of milliseconds given in a duration.
SelectBool takes an option and a default value and returns the default value if the option is equal to the zero value, and the option otherwise.
SelectDuration takes an option and a default value and returns the default value if the option is equal to zero, and the option otherwise.
SelectFloat takes an option and a default value and returns the default value if the option is equal to zero, and the option otherwise.
SelectInt takes an option and a default value and returns the default value if the option is equal to zero, and the option otherwise.
ShuffleStrings takes a slice of strings and returns a new slice containing the same strings in a random order.
ShuffleStringsInPlace uses the Fisher–Yates shuffle to randomize the strings in place.
SingleNodeCluster determines if hostport is the only host:port contained within the hostMap.
StringInSlice returns whether the string is contained within the slice.
TakeNode takes an element from nodes at the given index, or at a random index if index < 0.
TimeNowMS returns Unix time in milliseconds for time.Now().
TimeZero returns a time such that time.IsZero() is true.
UnixMS returns Unix time in milliseconds for the given time.
# Variables
HostportPattern is regex to match a host:port.
# Type aliases
Timestamp is a bi-directional binding of Time to interger Unix timestamp in JSON.