Documentation ¶
Index ¶
- func NewTransport(opts ...Option) micro.ITransport
- type Option
- type StatsHandler
- func (h *StatsHandler) HandleConn(ctx context.Context, s stats.ConnStats)
- func (h *StatsHandler) HandleRPC(ctx context.Context, s stats.RPCStats)
- func (h *StatsHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
- func (h *StatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransport ¶
func NewTransport(opts ...Option) micro.ITransport
Types ¶
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可以将一些信息附加到给定的上下文
Click to show internal directories.
Click to hide internal directories.