watchtower: make use of the new AddressIterator
This commit upgrades the wtclient package to make use of the new `AddressIterator`. It does so by first creating new `Tower` and `ClientSession` types. The new `Tower` type has an `AddressIterator` instead of a list of addresses. The `ClientSession` type contains a `Tower`.
This commit is contained in:
13 files changed
+274
-184
No files matched your search
@@ -20,10 +20,6 @@ var (
|
||||
// down.
|
||||
ErrNegotiatorExiting = errors.New("negotiator exiting")
|
||||
|
||||
// ErrNoTowerAddrs signals that the client could not be created because
|
||||
// we have no addresses with which we can reach a tower.
|
||||
ErrNoTowerAddrs = errors.New("no tower addresses")
|
||||
|
||||
// ErrFailedNegotiation signals that the session negotiator could not
|
||||
// acquire a new session as requested.
|
||||
ErrFailedNegotiation = errors.New("session negotiation unsuccessful")
|
||||
|
||||
Reference in new issue
Block a user