From b23bff62d53914a8903a34653ca497fe1214b37b Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 15 Mar 2019 02:31:11 -0700 Subject: [PATCH] watchtower/wtclient/errors --- watchtower/wtclient/errors.go | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 watchtower/wtclient/errors.go diff --git a/watchtower/wtclient/errors.go b/watchtower/wtclient/errors.go new file mode 100644 index 000000000..71b68cf15 --- /dev/null +++ b/watchtower/wtclient/errors.go @@ -0,0 +1,35 @@ +package wtclient + +import "errors" + +var ( + // ErrClientExiting signals that the watchtower client is shutting down. + ErrClientExiting = errors.New("watchtower client shutting down") + + // ErrTowerCandidatesExhausted signals that a TowerCandidateIterator has + // cycled through all available candidates. + ErrTowerCandidatesExhausted = errors.New("exhausted all tower " + + "candidates") + + // ErrPermanentTowerFailure signals that the tower has reported that it + // has permanently failed or the client believes this has happened based + // on the tower's behavior. + ErrPermanentTowerFailure = errors.New("permanent tower failure") + + // ErrNegotiatorExiting signals that the SessionNegotiator is shutting + // 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") + + // ErrUnregisteredChannel signals that the client was unable to backup a + // revoked state becuase the channel had not been previously registered + // with the client. + ErrUnregisteredChannel = errors.New("channel is not registered") +)