github.com/decred/dcrlnd@v0.7.6/watchtower/interface.go (about) 1 package watchtower 2 3 import ( 4 "net" 5 6 "github.com/decred/dcrlnd/watchtower/lookout" 7 "github.com/decred/dcrlnd/watchtower/wtserver" 8 ) 9 10 // DB abstracts the persistent functionality required to run the watchtower 11 // daemon. It composes the database interfaces required by the lookout and 12 // wtserver subsystems. 13 type DB interface { 14 lookout.DB 15 wtserver.DB 16 } 17 18 // AddressNormalizer is a function signature that allows the tower to resolve 19 // TCP addresses on clear or onion networks. 20 type AddressNormalizer func(addrs []string, defaultPort string, 21 resolver func(string, string) (*net.TCPAddr, error)) ([]net.Addr, error)