Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(writer io.Writer) grpc.StreamServerInterceptor
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(writer io.Writer) grpc.UnaryServerInterceptor
记录grpc请求
Types ¶
type TokenBucketLimiter ¶
用漏桶实现
func NewTokenBucketLimiter ¶
func NewTokenBucketLimiter(r rate.Limit, b int) *TokenBucketLimiter
func (*TokenBucketLimiter) Limit ¶
func (t *TokenBucketLimiter) Limit() bool
Click to show internal directories.
Click to hide internal directories.