2022-05-28 22:02:18 +00:00
|
|
|
package common
|
|
|
|
|
|
2022-06-09 03:10:56 +00:00
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"errors"
|
|
|
|
|
"net"
|
|
|
|
|
)
|
2022-05-28 22:02:18 +00:00
|
|
|
|
|
|
|
|
var ErrNotEnoughServers = errors.New("not enough servers found")
|
2022-06-09 03:10:56 +00:00
|
|
|
|
|
|
|
|
type ParallelResolver interface {
|
|
|
|
|
Resolve(ctx context.Context, hosts []string, minToFind int) (
|
|
|
|
|
hostToIPs map[string][]net.IP, warnings []string, err error)
|
|
|
|
|
}
|