Documentation ¶
Index ¶
- Constants
- Variables
- func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) error
- func UnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, ...) error
- func UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
Constants ¶
View Source
const ( KeepFirstNStreamingMessages = 5 KeepLastNStreamingMessages = 5 )
Variables ¶
View Source
var ( // SamplingRate is the chance it samples the message. SamplingRate = 1.0 RetainRPCsPerMethod = 10 RecordMetadata = true )
View Source
var ( ClientOptions = []grpc.DialOption{ grpc.WithChainUnaryInterceptor(UnaryClientInterceptor), grpc.WithChainStreamInterceptor(StreamClientInterceptor), } ServerOptions = []grpc.ServerOption{ grpc.ChainUnaryInterceptor(UnaryServerInterceptor), grpc.ChainStreamInterceptor(StreamServerInterceptor), } )
View Source
var Handler http.Handler = convreq.Wrap(handler)
Functions ¶
func StreamClientInterceptor ¶ added in v0.2.0
func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
func StreamServerInterceptor ¶ added in v0.2.0
func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error
func UnaryClientInterceptor ¶
func UnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.