nopshedder.go 264 B

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