handler

package
v3.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Package filter is a generated GoMock package.

Index

Constants

View Source
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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL