Documentation ¶
Index ¶
- func HitGrpc(ctx context.Context, f HitGrpcFunc) (*vegetahelper.HitResult, error)
- func MapCode2Status(code codes.Code) uint16
- func SetRpcStat(ctx context.Context, s *RpcStat) context.Context
- type HitGrpcFunc
- type RpcStat
- type RpcStatsHandler
- func (r *RpcStatsHandler) HandleConn(ctx context.Context, cs stats.ConnStats)
- func (r *RpcStatsHandler) HandleRPC(ctx context.Context, rs stats.RPCStats)
- func (r *RpcStatsHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context
- func (r *RpcStatsHandler) TagRPC(ctx context.Context, rti *stats.RPCTagInfo) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HitGrpc ¶
func HitGrpc(ctx context.Context, f HitGrpcFunc) (*vegetahelper.HitResult, error)
func MapCode2Status ¶
Types ¶
type HitGrpcFunc ¶
type RpcStat ¶
func GetRpcStat ¶
GetRpcStat returns intstance of RpcStat from the context. If there is no RpcStat is set, returns nil.
type RpcStatsHandler ¶
type RpcStatsHandler struct { }
RpcStatsHandler treats Sent/Recv Count/Bytes
func (*RpcStatsHandler) HandleConn ¶
func (r *RpcStatsHandler) HandleConn(ctx context.Context, cs stats.ConnStats)
HandleConn exists to satisfy gRPC stats.Handler.
func (*RpcStatsHandler) HandleRPC ¶
func (r *RpcStatsHandler) HandleRPC(ctx context.Context, rs stats.RPCStats)
HandleRPC implements per-RPC tracing and stats instrumentation.
func (*RpcStatsHandler) TagConn ¶
func (r *RpcStatsHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context
TagConn exists to satisfy gRPC stats.Handler.
func (*RpcStatsHandler) TagRPC ¶
func (r *RpcStatsHandler) TagRPC(ctx context.Context, rti *stats.RPCTagInfo) context.Context
TagRPC implements per-RPC context management.
Click to show internal directories.
Click to hide internal directories.