dubbo.apache.org/dubbo-go/v3@v3.1.1/filter/tps/limiter/mock.go (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   * contributor license agreements.  See the NOTICE file distributed with
     4   * this work for additional information regarding copyright ownership.
     5   * The ASF licenses this file to You under the Apache License, Version 2.0
     6   * (the "License"); you may not use this file except in compliance with
     7   * the License.  You may obtain a copy of the License at
     8   *
     9   *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  
    18  // Code generated by MockGen. DO NOT EDIT.
    19  // Source: tps_limiter.go
    20  
    21  // Package filter is a generated GoMock package.
    22  package limiter
    23  
    24  import (
    25  	reflect "reflect"
    26  )
    27  
    28  import (
    29  	gomock "github.com/golang/mock/gomock"
    30  )
    31  
    32  import (
    33  	common "dubbo.apache.org/dubbo-go/v3/common"
    34  	protocol "dubbo.apache.org/dubbo-go/v3/protocol"
    35  )
    36  
    37  // MockTpsLimiter is a mock of TpsLimiter interface
    38  type MockTpsLimiter struct {
    39  	ctrl     *gomock.Controller
    40  	recorder *MockTpsLimiterMockRecorder
    41  }
    42  
    43  // MockTpsLimiterMockRecorder is the mock recorder for MockTpsLimiter
    44  type MockTpsLimiterMockRecorder struct {
    45  	mock *MockTpsLimiter
    46  }
    47  
    48  // NewMockTpsLimiter creates a new mock instance
    49  func NewMockTpsLimiter(ctrl *gomock.Controller) *MockTpsLimiter {
    50  	mock := &MockTpsLimiter{ctrl: ctrl}
    51  	mock.recorder = &MockTpsLimiterMockRecorder{mock}
    52  	return mock
    53  }
    54  
    55  // EXPECT returns an object that allows the caller to indicate expected use
    56  func (m *MockTpsLimiter) EXPECT() *MockTpsLimiterMockRecorder {
    57  	return m.recorder
    58  }
    59  
    60  // IsAllowable mocks base method
    61  func (m *MockTpsLimiter) IsAllowable(arg0 *common.URL, arg1 protocol.Invocation) bool {
    62  	m.ctrl.T.Helper()
    63  	ret := m.ctrl.Call(m, "IsAllowable", arg0, arg1)
    64  	ret0, _ := ret[0].(bool)
    65  	return ret0
    66  }
    67  
    68  // IsAllowable indicates an expected call of IsAllowable
    69  func (mr *MockTpsLimiterMockRecorder) IsAllowable(arg0, arg1 interface{}) *gomock.Call {
    70  	mr.mock.ctrl.T.Helper()
    71  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAllowable", reflect.TypeOf((*MockTpsLimiter)(nil).IsAllowable), arg0, arg1)
    72  }