mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 09:00:20 +08:00
20 lines
260 B
Go
20 lines
260 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() {
|
|
}
|