Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OrderedSRV ¶
OrderedSRV returns a count of the results and a map keyed on the order they should be used. This based on the records' priority and randomised selection based on their relative weighting. The function's inputs are the same as those for net.LookupSRV To use in the correct order:
count, orderedSRV, err := OrderedSRV(service, proto, name) i := 1
for i <= count { srv := orderedSRV[i] // Do something such as dial this SRV. If fails move on the the next or break if it succeeds. i += 1 }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.