698df2ac16
This commit adds the `lnnet` package which contains an implementation of the newly created LightningNet interface which multiplexes the Dial and DNS-related functions to use net by default and torsvc if a flag is specified. This modularization makes for cleaner code.
14 lines
327 B
Go
14 lines
327 B
Go
package torsvc
|
|
|
|
import (
|
|
"net"
|
|
)
|
|
|
|
// Net is an interface housing a Dial function and several DNS functions.
|
|
type Net interface {
|
|
Dial(string, string) (net.Conn, error)
|
|
LookupHost(string) ([]string, error)
|
|
LookupSRV(string, string, string) (string, []*net.SRV, error)
|
|
ResolveTCPAddr(string, string) (*net.TCPAddr, error)
|
|
}
|