Back to godoc.org
github.com/bilibili/kratos / pkg / net / rpc / warden / ratelimiter

Package ratelimiter

v0.3.3
Latest Go to latest

The latest major version is .

Published: Jan 20, 2020 | License: MIT | Module: github.com/bilibili/kratos

Index

type RateLimiter

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

RateLimiter bbr middleware.

func New

func New(conf *bbr.Config) (s *RateLimiter)

New return a ratelimit middleware.

func (*RateLimiter) Limit

func (b *RateLimiter) Limit() grpc.UnaryServerInterceptor

Limit is a server interceptor that detects and rejects overloaded traffic.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier