内容压缩增加繁忙(busy)检测

This commit is contained in:
GoEdgeLab
2024-04-17 08:36:14 +08:00
parent 1e24eceee9
commit e7b70dd9b3
7 changed files with 58 additions and 28 deletions

View File

@@ -0,0 +1,14 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package compressions
import "errors"
var ErrIsBusy = errors.New("the system is busy for compression")
func CanIgnore(err error) bool {
if err == nil {
return true
}
return errors.Is(err, ErrIsBusy)
}