Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EP ¶
type EP struct {
// contains filtered or unexported fields
}
func MustParse ¶
MustParse() is similar to Parse(), but it panics if endpoint is invalid and can't be parsed. useful primarily for tests and global "consts" inits.
func Parse ¶
Parse() is like ParseStricter(), but it disregards spaces before and after the endpoint string.
func ParseStricter ¶
func (EP) MarshalJSON ¶
func (EP) PortString ¶
type Slice ¶
type Slice []EP
func MustParseCSV ¶
func ParseCSV ¶
ParseCSV() parses a string containing comma-separated list of target endpoints, validates them syntactically, and returns a slice of EP structs. it does NOT attempt to resolve the names present in the endpoints nor does it try to connect to any of the targets. `targets` must be in a format:
<host>:<port>[,<host>:<port>...]
func ParseSlice ¶
func ParseSliceIP ¶
ParseSliceIP() is akin to ParseSlice, but it only accepts a valid IPv4/IPv6 addresses as hosts.