package dnsutils
Import Path
github.com/jcmturner/dnsutils/v2 (on go.dev)
Dependency Relation
imports 3 packages, and imported by one package
Involved Source Files
srv.go
Package-Level Functions (only one)
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
}
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |