github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/worker/raft/rafttransport/errors.go (about) 1 // Copyright 2018 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package rafttransport 5 6 // dialRequestTimeoutError is an error type used when 7 // sending a dial request times out. 8 type dialRequestTimeoutError struct{} 9 10 func (dialRequestTimeoutError) Error() string { 11 return "timed out dialing" 12 } 13 14 func (dialRequestTimeoutError) Temporary() bool { 15 return true 16 } 17 18 func (dialRequestTimeoutError) Timeout() bool { 19 return true 20 } 21 22 // dialWorkerStoppedError wraps an error that indicates 23 // the dial worker has stopped as the reason why dialling 24 // failed. 25 type dialWorkerStoppedError struct { 26 error 27 } 28 29 func (dialWorkerStoppedError) Temporary() bool { 30 return true 31 } 32 33 func (dialWorkerStoppedError) Timeout() bool { 34 return false 35 }