core/hosts/hosts.go
2023-10-26 22:20:46 +08:00

16 lines
263 B
Go

package hosts
import (
"context"
"net"
)
type Options struct{}
type Option func(opts *Options)
// HostMapper is a mapping from hostname to IP.
type HostMapper interface {
Lookup(ctx context.Context, network, host string, opts ...Option) ([]net.IP, bool)
}