xgrpc

package
v0.0.0-...-c702e84 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultServerMiddlewares ...
	DefaultServerMiddlewares = []middleware.Middleware{StartAt(), tracing.Server(), Log(), Recovery(), metadata.Server(), RateLimit(bbr.WithCPUThreshold(900)), Validator()}
	// DefaultClientMiddlewares ...
	DefaultClientMiddlewares = []middleware.Middleware{Recovery(), tracing.Client(), metadata.Client(), ClientBreaker()}
)

Functions

func ClientBreaker

func ClientBreaker() middleware.Middleware

ClientBreaker ...

func GetClientConn

func GetClientConn(endpoint string, timeout int, dialWithCredentials bool, opts ...kgrpc.ClientOption) (*grpc.ClientConn, error)

GetClientConn ...

func GetRPCClientConn

func GetRPCClientConn(configPath string, opts ...kgrpc.ClientOption) *grpc.ClientConn

GetRPCClientConn 配置结构规则 config/env/env.go:58

func Log

func Log() middleware.Middleware

Log ...

func NewGRPCServer

func NewGRPCServer(opts ...kgrpc.ServerOption) *kgrpc.Server

NewGRPCServer ...

func RateLimit

func RateLimit(opts ...bbr.Option) middleware.Middleware

RateLimit ...

func Recovery

func Recovery() middleware.Middleware

Recovery ...

func StartAt

func StartAt() middleware.Middleware

StartAt ...

func Validator

func Validator() middleware.Middleware

Validator ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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