limiter

package
v1.76.19 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 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