lnd.xprv/torsvc/interface.go
nsa 698df2ac16 torsvc: added new type that multiplexes torsvc and net packages
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.
2018-02-05 17:37:46 -08:00

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)
}