middleware

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 19 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRPCAuthDialOptions

func GetRPCAuthDialOptions(conf *setting.RPCAuthSettingS) (opts []grpc.DialOption)

func GetRPCPerAuthHeader added in v1.5.11

func GetRPCPerAuthHeader(secret string) (map[string]string, error)

GetRPCPerAuthHeader 根据私钥获取RPC 接入auth header

func RPCPerCredentials added in v1.4.7

func RPCPerCredentials(sharedSecret string) credentials.PerRPCCredentials

Types

type AuthInfo

type AuthInfo struct {
	Version       string
	SignedMessage []byte
	Message       string
}

type Limiter added in v1.5.13

type Limiter interface {
	Limit() bool
	ReturnTicket()
}

func NewKelvinsRateLimit added in v1.5.13

func NewKelvinsRateLimit(maxConcurrent int) Limiter

type RPCPerAuthInterceptor added in v1.5.11

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

func NewRPCPerAuthInterceptor added in v1.5.11

func NewRPCPerAuthInterceptor(errLogger log.LoggerContextIface) *RPCPerAuthInterceptor

func (*RPCPerAuthInterceptor) StreamServerInterceptor added in v1.5.11

func (i *RPCPerAuthInterceptor) StreamServerInterceptor(conf *setting.RPCAuthSettingS) grpc.StreamServerInterceptor

func (*RPCPerAuthInterceptor) UnaryServerInterceptor added in v1.5.11

func (i *RPCPerAuthInterceptor) UnaryServerInterceptor(conf *setting.RPCAuthSettingS) grpc.UnaryServerInterceptor

type RPCRateLimitInterceptor added in v1.5.13

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

func NewRPCRateLimitInterceptor added in v1.5.13

func NewRPCRateLimitInterceptor(maxConcurrent int) *RPCRateLimitInterceptor

func (*RPCRateLimitInterceptor) StreamServerInterceptor added in v1.5.13

func (r *RPCRateLimitInterceptor) StreamServerInterceptor() grpc.StreamServerInterceptor

func (*RPCRateLimitInterceptor) UnaryServerInterceptor added in v1.5.13

func (r *RPCRateLimitInterceptor) UnaryServerInterceptor() grpc.UnaryServerInterceptor

Jump to

Keyboard shortcuts

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