grpcx_ratelimit

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyGetter

type KeyGetter interface {
	GetKey(ctx context.Context, fullMethod string) string
}

type RateLimitInterceptor

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

func NewRateLimitInterceptor

func NewRateLimitInterceptor(options ...RateLimitInterceptorOption) *RateLimitInterceptor

func (*RateLimitInterceptor) StreamServerInterceptor

func (r *RateLimitInterceptor) StreamServerInterceptor(keyGetter KeyGetter) grpc.StreamServerInterceptor

func (*RateLimitInterceptor) UnaryServerInterceptor

func (r *RateLimitInterceptor) UnaryServerInterceptor(keyGetter KeyGetter) grpc.UnaryServerInterceptor

type RateLimitInterceptorOption

type RateLimitInterceptorOption func(*RateLimitInterceptor)

func WithMemoryStore

func WithMemoryStore(mstore *memrate.MemoryStore) RateLimitInterceptorOption

Jump to

Keyboard shortcuts

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