Add errdefs package

Providers should use this package so the virtual kubelet core
controllers can understand the errors produced from the provider code.
This commit is contained in:
Brian Goff
2019-05-20 13:39:50 -07:00
parent 8340407f98
commit b9711abff3
7 changed files with 308 additions and 0 deletions

10
errdefs/wrapped.go Normal file
View File

@@ -0,0 +1,10 @@
package errdefs
// Causal is an error interface for errors which have wrapped another error
// in a non-opaque way.
//
// This pattern is used by github.com/pkg/errors
type causal interface {
Cause() error
error
}