middlewares

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeClientOptions

func MakeClientOptions(
	logger *zap.Logger,
) []grpc.DialOption

func MakeServerOptions

func MakeServerOptions(
	logger *zap.Logger,
	authClient siface.IAuth,
	deployments utility.Deployments,
	rateLimit int32,
	opts ...grpc.ServerOption,
) []grpc.ServerOption

Types

type RateLimiter

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

RateLimiter rate limit

func CreateRateLimiter

func CreateRateLimiter(rate int) *RateLimiter

func (*RateLimiter) Limit

func (rl *RateLimiter) Limit(_ context.Context) error

Jump to

Keyboard shortcuts

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