grpc

package module
v0.0.0-...-6bde7cc Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransport

func NewTransport(opts ...Option) micro.ITransport

Types

type Option

type Option func(o *option)

func Address

func Address(address string) Option

func M

func M(register, handler interface{}) Option

type StatsHandler

type StatsHandler struct {
}

func (*StatsHandler) HandleConn

func (h *StatsHandler) HandleConn(ctx context.Context, s stats.ConnStats)

会在连接开始和结束时被调用,分别会输入不同的状态.

func (*StatsHandler) HandleRPC

func (h *StatsHandler) HandleRPC(ctx context.Context, s stats.RPCStats)

处理RPC统计信息

func (*StatsHandler) TagConn

func (h *StatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context

TagConn可以将一些信息附加到给定的上下文。

func (*StatsHandler) TagRPC

func (h *StatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context

TagRPC可以将一些信息附加到给定的上下文

Jump to

Keyboard shortcuts

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