Documentation ¶
Overview ¶
Package filter is a generated GoMock package.
Index ¶
Constants ¶
const (
// HandlerName handler name
HandlerName = "log"
)
Variables ¶
This section is empty.
Functions ¶
func GetOnlyLogRejectedExecutionHandler ¶
func GetOnlyLogRejectedExecutionHandler() filter.RejectedExecutionHandler
GetOnlyLogRejectedExecutionHandler will return the instance of OnlyLogRejectedExecutionHandler
Types ¶
type MockRejectedExecutionHandler ¶
type MockRejectedExecutionHandler struct {
// contains filtered or unexported fields
}
MockRejectedExecutionHandler is a mock of RejectedExecutionHandler interface
func NewMockRejectedExecutionHandler ¶
func NewMockRejectedExecutionHandler(ctrl *gomock.Controller) *MockRejectedExecutionHandler
NewMockRejectedExecutionHandler creates a new mock instance
func (*MockRejectedExecutionHandler) EXPECT ¶
func (m *MockRejectedExecutionHandler) EXPECT() *MockRejectedExecutionHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockRejectedExecutionHandler) RejectedExecution ¶
func (m *MockRejectedExecutionHandler) RejectedExecution(url *common.URL, invocation protocol.Invocation) protocol.Result
RejectedExecution mocks base method
type MockRejectedExecutionHandlerMockRecorder ¶
type MockRejectedExecutionHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockRejectedExecutionHandlerMockRecorder is the mock recorder for MockRejectedExecutionHandler
func (*MockRejectedExecutionHandlerMockRecorder) RejectedExecution ¶
func (mr *MockRejectedExecutionHandlerMockRecorder) RejectedExecution(url, invocation interface{}) *gomock.Call
RejectedExecution indicates an expected call of RejectedExecution
type OnlyLogRejectedExecutionHandler ¶
type OnlyLogRejectedExecutionHandler struct { }
OnlyLogRejectedExecutionHandler implements the RejectedExecutionHandler *
- This implementation only logs the invocation info.
- it always return en error inside the result.
- "UserProvider":
- registry: "hangzhouzk"
- protocol : "dubbo"
- interface : "com.ikurento.user.UserProvider"
- ... # other configuration
- tps.limiter: "method-service" # the name of limiter
- tps.limit.rejected.handler: "default" or "log"
- methods:
- - name: "GetUser"
- OnlyLogRejectedExecutionHandler is designed to be singleton
func (*OnlyLogRejectedExecutionHandler) RejectedExecution ¶
func (handler *OnlyLogRejectedExecutionHandler) RejectedExecution(url *common.URL, _ protocol.Invocation) protocol.Result
RejectedExecution will do nothing, it only log the invocation.