Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Commit

Permalink
add ErrNoConn error
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Apr 10, 2019
1 parent 6c61dc9 commit fa9787c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ type Network interface {
// There are no addresses associated with a peer when they were needed.
var ErrNoRemoteAddrs = errors.New("no remote addresses")

// ErrNoConn is returned when attempting to open a stream to a peer with the NoDial
// option and no usable connection is available.
var ErrNoConn = errors.New("no usable connection to peer")

// Dialer represents a service that can dial out to peers
// (this is usually just a Network, but other services may not need the whole
// stack, and thus it becomes easier to mock)
Expand Down

0 comments on commit fa9787c

Please sign in to comment.