clientplugin

package
v0.0.0-...-c714362 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisRateLimitingPlugin

type RedisRateLimitingPlugin struct {
	// contains filtered or unexported fields
}

RedisRateLimitingPlugin can limit requests per unit time

func NewRedisRateLimitingPlugin

func NewRedisRateLimitingPlugin(addrs []string, rate int, burst int, period time.Duration) *RedisRateLimitingPlugin

NewRedisRateLimitingPlugin creates a new RateLimitingPlugin

func (*RedisRateLimitingPlugin) PreCall

func (plugin *RedisRateLimitingPlugin) PreCall(ctx context.Context, servicePath, serviceMethod string, args interface{}) error

PreCall can limit request processing.

Jump to

Keyboard shortcuts

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