StubStatsHandler is a stats handler that is easy to customize within individual test cases. It is a stubbable implementation of google.golang.org/grpc/stats.Handler for testing purposes.
| 28 | // individual test cases. It is a stubbable implementation of |
| 29 | // google.golang.org/grpc/stats.Handler for testing purposes. |
| 30 | type StubStatsHandler struct { |
| 31 | TagRPCF func(ctx context.Context, info *stats.RPCTagInfo) context.Context |
| 32 | HandleRPCF func(ctx context.Context, info stats.RPCStats) |
| 33 | TagConnF func(ctx context.Context, info *stats.ConnTagInfo) context.Context |
| 34 | HandleConnF func(ctx context.Context, info stats.ConnStats) |
| 35 | } |
| 36 | |
| 37 | // TagRPC calls the StubStatsHandler's TagRPCF, if set. |
| 38 | func (ssh *StubStatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context { |
nothing calls this directly
no outgoing calls
no test coverage detected