transdep/errors/timeout.go

20 lines
390 B
Go
Raw Normal View History

2018-01-23 20:25:00 +00:00
package errors
import "fmt"
type TimeoutError struct {
operation string
requestTopic string
}
func NewTimeoutError(operation, topic string) *TimeoutError {
te := new(TimeoutError)
te.operation = operation
te.requestTopic = topic
return te
}
func (te *TimeoutError) Error() string {
return fmt.Sprintf("timeout while performing \"%s\" on \"%s\"", te.operation, te.requestTopic)
}