mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-19 20:46:40 +00:00
Migrate to containerd 1.54
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
4c9c66812a
commit
2ae8b31ac0
23
vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go
generated
vendored
23
vendor/github.com/Microsoft/hcsshim/internal/hcs/errors.go
generated
vendored
@ -171,7 +171,6 @@ type SystemError struct {
|
||||
ID string
|
||||
Op string
|
||||
Err error
|
||||
Extra string
|
||||
Events []ErrorEvent
|
||||
}
|
||||
|
||||
@ -182,9 +181,6 @@ func (e *SystemError) Error() string {
|
||||
for _, ev := range e.Events {
|
||||
s += "\n" + ev.String()
|
||||
}
|
||||
if e.Extra != "" {
|
||||
s += "\n(extra info: " + e.Extra + ")"
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
@ -198,7 +194,7 @@ func (e *SystemError) Timeout() bool {
|
||||
return ok && err.Timeout()
|
||||
}
|
||||
|
||||
func makeSystemError(system *System, op string, extra string, err error, events []ErrorEvent) error {
|
||||
func makeSystemError(system *System, op string, err error, events []ErrorEvent) error {
|
||||
// Don't double wrap errors
|
||||
if _, ok := err.(*SystemError); ok {
|
||||
return err
|
||||
@ -206,7 +202,6 @@ func makeSystemError(system *System, op string, extra string, err error, events
|
||||
return &SystemError{
|
||||
ID: system.ID(),
|
||||
Op: op,
|
||||
Extra: extra,
|
||||
Err: err,
|
||||
Events: events,
|
||||
}
|
||||
@ -312,6 +307,13 @@ func IsOperationInvalidState(err error) bool {
|
||||
return err == ErrVmcomputeOperationInvalidState
|
||||
}
|
||||
|
||||
// IsAccessIsDenied returns true when err is caused by
|
||||
// `ErrVmcomputeOperationAccessIsDenied`.
|
||||
func IsAccessIsDenied(err error) bool {
|
||||
err = getInnerError(err)
|
||||
return err == ErrVmcomputeOperationAccessIsDenied
|
||||
}
|
||||
|
||||
func getInnerError(err error) error {
|
||||
switch pe := err.(type) {
|
||||
case nil:
|
||||
@ -325,12 +327,3 @@ func getInnerError(err error) error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func getOperationLogResult(err error) (string, error) {
|
||||
switch err {
|
||||
case nil:
|
||||
return "Success", nil
|
||||
default:
|
||||
return "Error", err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user