github.com/lyft/flytestdlib@v0.3.12-0.20210213045714-8cdd111ecda1/utils/mocks/rate_limiter.go (about) 1 // Code generated by mockery v1.0.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 ) 10 11 // RateLimiter is an autogenerated mock type for the RateLimiter type 12 type RateLimiter struct { 13 mock.Mock 14 } 15 16 type RateLimiter_Wait struct { 17 *mock.Call 18 } 19 20 func (_m RateLimiter_Wait) Return(_a0 error) *RateLimiter_Wait { 21 return &RateLimiter_Wait{Call: _m.Call.Return(_a0)} 22 } 23 24 func (_m *RateLimiter) OnWait(ctx context.Context) *RateLimiter_Wait { 25 c := _m.On("Wait", ctx) 26 return &RateLimiter_Wait{Call: c} 27 } 28 29 func (_m *RateLimiter) OnWaitMatch(matchers ...interface{}) *RateLimiter_Wait { 30 c := _m.On("Wait", matchers...) 31 return &RateLimiter_Wait{Call: c} 32 } 33 34 // Wait provides a mock function with given fields: ctx 35 func (_m *RateLimiter) Wait(ctx context.Context) error { 36 ret := _m.Called(ctx) 37 38 var r0 error 39 if rf, ok := ret.Get(0).(func(context.Context) error); ok { 40 r0 = rf(ctx) 41 } else { 42 r0 = ret.Error(0) 43 } 44 45 return r0 46 }