filter

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 3 Imported by: 8 modules, 11 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessKeyPair added in v1.4.0

type AccessKeyPair struct {
	AccessKey    string `yaml:"accessKey"   json:"accessKey,omitempty" property:"accessKey"`
	SecretKey    string `yaml:"secretKey"   json:"secretKey,omitempty" property:"secretKey"`
	ConsumerSide string `yaml:"consumerSide"   json:"ConsumerSide,consumerSide" property:"consumerSide"`
	ProviderSide string `yaml:"providerSide"   json:"providerSide,omitempty" property:"providerSide"`
	Creator      string `yaml:"creator"   json:"creator,omitempty" property:"creator"`
	Options      string `yaml:"options"   json:"options,omitempty" property:"options"`
}

type AccessKeyStorage added in v1.4.0

type AccessKeyStorage interface {
	GetAccessKeyPair(protocol.Invocation, *common.URL) *AccessKeyPair
}

AccessKeyStorage This SPI Extension support us to store our AccessKeyPair or load AccessKeyPair from other storage, such as filesystem.

type Authenticator added in v1.4.0

type Authenticator interface {

	// Sign
	// give a sign to request
	Sign(protocol.Invocation, *common.URL) error

	// Authenticate
	// verify the signature of the request is valid or not
	Authenticate(protocol.Invocation, *common.URL) error
}

Authenticator

type Filter

Filter Extension - Filter

type RejectedExecutionHandler added in v1.3.0

type RejectedExecutionHandler interface {
	RejectedExecution(url common.URL, invocation protocol.Invocation) protocol.Result
}

*

  • RejectedExecutionHandler
  • If the invocation cannot pass any validation in filter, like ExecuteLimitFilter and TpsLimitFilter,
  • the implementation will be used.
  • The common case is that sometimes you want to return the default value when the request was rejected.
  • Or you want to be warned if any request was rejected.
  • In such situation, implement this interface and register it by invoking extension.SetRejectedExecutionHandler.

type TpsLimitStrategy added in v1.3.0

type TpsLimitStrategy interface {
	IsAllowable() bool
}

* TpsLimitStrategy * please register your implementation by invoking SetTpsLimitStrategy * "UserProvider": * registry: "hangzhouzk" * protocol : "dubbo" * interface : "com.ikurento.user.UserProvider" * ... # other configuration * tps.limiter: "method-service" # the name of limiter * tps.limit.strategy: "name of implementation" # service-level * methods: * - name: "GetUser" * tps.interval: 3000 * tps.limit.strategy: "name of implementation" # method-level

type TpsLimitStrategyCreator added in v1.3.0

type TpsLimitStrategyCreator interface {
	Create(rate int, interval int) TpsLimitStrategy
}

TpsLimitStrategyCreator ...

type TpsLimiter added in v1.3.0

type TpsLimiter interface {
	IsAllowable(common.URL, protocol.Invocation) bool
}

* TpsLimiter * please register your implementation by invoking SetTpsLimiter * The usage, for example: * "UserProvider": * registry: "hangzhouzk" * protocol : "dubbo" * interface : "com.ikurento.user.UserProvider" * ... # other configuration * tps.limiter: "the name of limiter",

Directories

Path Synopsis
tps
Package filter is a generated GoMock package.
Package filter is a generated GoMock package.
Package filter is a generated GoMock package.
Package filter is a generated GoMock package.

Jump to

Keyboard shortcuts

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