lib

package
v0.0.0-...-14d8bfa Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RequestIDKey = keyType(iota)

Variables

This section is empty.

Functions

func ChannelzClient

func ChannelzClient(addr string) channelz.ChannelzClient

ChannelzClient creates a new grpc channelz client for connecting to a registered channelz server for debugging.

func NewStreamLogger

func NewStreamLogger() grpc.StreamServerInterceptor

func NewStreamRateLimiter

func NewStreamRateLimiter(opts ...RateLimitOption) grpc.StreamServerInterceptor

func NewTokenBucketRateLimiter

func NewTokenBucketRateLimiter(fillInterval time.Duration, capacity, quantum int64) *tokenBucketLimiter

func NewUnaryLogger

func NewUnaryLogger() grpc.UnaryServerInterceptor

func NewUnaryRateLimiter

func NewUnaryRateLimiter(opts ...RateLimitOption) grpc.UnaryServerInterceptor

func NewUnaryUUID

func NewUnaryUUID() grpc.UnaryServerInterceptor

func UnaryAuthInterceptor

func UnaryAuthInterceptor(ctxFunc func(ctx context.Context) (context.Context, error)) grpc.UnaryServerInterceptor

Types

type Channelz

type Channelz struct {
	driver.PluginFunc
}

func NewChannelz

func NewChannelz() *Channelz

func NewReflection

func NewReflection() *Channelz

type Healthz

type Healthz struct {
	driver.PluginFunc
}

func NewHealthz

func NewHealthz() *Healthz

type Limiter

type Limiter interface {
	WaitMaxDuration(time.Duration) bool
}

type RateLimitOption

type RateLimitOption func(*rateLimiter)

func WithLimiter

func WithLimiter(l Limiter) RateLimitOption

func WithMaxWaitDuration

func WithMaxWaitDuration(maxWaitDuration time.Duration) RateLimitOption

type Reflection

type Reflection struct {
	driver.PluginFunc
}

Jump to

Keyboard shortcuts

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