mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-12 16:11:24 +08:00
Dialer for dht
dht doesn't need the whole network interface, only needs a Dialer. (much reduced surface of possible errors)
This commit is contained in:
@ -48,3 +48,12 @@ type Handler srv.Handler
|
||||
|
||||
// Service interface for network resources.
|
||||
type Service srv.Service
|
||||
|
||||
// Dialer service that can dial to peers
|
||||
// (this is usually just a Network, but other services may not need the whole
|
||||
// thing, and thus it becomes easier to mock)
|
||||
type Dialer interface {
|
||||
|
||||
// DialPeer attempts to establish a connection to a given peer
|
||||
DialPeer(peer.Peer) error
|
||||
}
|
||||
|
Reference in New Issue
Block a user