nopshedder.go 260 B

12345678910111213141516171819
  1. package load
  2. type nopShedder struct{}
  3. func newNopShedder() Shedder {
  4. return nopShedder{}
  5. }
  6. func (s nopShedder) Allow() (Promise, error) {
  7. return nopPromise{}, nil
  8. }
  9. type nopPromise struct{}
  10. func (p nopPromise) Pass() {
  11. }
  12. func (p nopPromise) Fail() {
  13. }