You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/core/load/nopshedder.go

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() {
}