go-zero/core/load/nopshedder.go
2020-07-26 17:09:05 +08:00

22 lines
264 B
Go

package load
type nopShedder struct {
}
func newNopShedder() Shedder {
return nopShedder{}
}
func (s nopShedder) Allow() (Promise, error) {
return nopPromise{}, nil
}
type nopPromise struct {
}
func (p nopPromise) Pass() {
}
func (p nopPromise) Fail() {
}