# Packages
Package dnssrv defines some implementations for a dns based service discovery
*/.
# Functions
FixedSubscriberFactory builds a FixedSubscriber with the received config.
GetRegister returns the package register.
NewBalancer returns the best perfomant balancer depending on the number of available processors.
NewRandomFixedSubscriber randomizes a list of hosts and builds a FixedSubscriber with it.
NewRandomLB returns a new balancer using a fastrand pseudorandom generator.
NewRoundRobinLB returns a new balancer using a round robin strategy and starting at a random position in the set of hosts.
# Variables
ErrNoHosts is the error the balancer must return when there are 0 hosts ready.
# Structs
Register is a SD register, mapping different SD subscriber factories to their respective name, so they can be accessed by name.
# Interfaces
Balancer applies a balancing stategy in order to select the backend host to be used.
Subscriber keeps the set of backend hosts up to date.
# Type aliases
FixedSubscriber has a constant set of backend hosts and they never get updated.
SubscriberFactory builds subscribers with the received config.
SubscriberFunc type is an adapter to allow the use of ordinary functions as subscribers.