limiter

package
v1.90.3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLimiter

func NewLimiter(formatted string) (*limiter.Limiter, error)

NewLimiter for gRPC.

func StreamServerInterceptor

func StreamServerInterceptor(limiter *limiter.Limiter, key KeyFunc) grpc.StreamServerInterceptor

StreamServerInterceptor for gRPC.

func UnaryServerInterceptor

func UnaryServerInterceptor(limiter *limiter.Limiter, key KeyFunc) grpc.UnaryServerInterceptor

UnaryServerInterceptor for gRPC.

Types

type KeyFunc

type KeyFunc func(context.Context) string

KeyFunc to get for gRPC.

Jump to

Keyboard shortcuts

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