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

20 lines
260 B
Go

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