Documentation ¶
Index ¶
- func AppendMetadataToOutgoingStreamContext() grpc.StreamClientInterceptor
- func AppendMetadataToOutgoingUnaryContext() grpc.UnaryClientInterceptor
- func CountIncomingStreamRequests() grpc.StreamServerInterceptor
- func CountIncomingUnaryRequests() grpc.UnaryServerInterceptor
- func LogOutgoingStreamRequest() grpc.StreamClientInterceptor
- func LogOutgoingUnaryRequest() grpc.UnaryClientInterceptor
- func LogStreamRequest() grpc.StreamServerInterceptor
- func LogUnaryRequest() grpc.UnaryServerInterceptor
- func SetMetadataFromStreamRequest() grpc.StreamServerInterceptor
- func SetMetadataFromUnaryRequest() grpc.UnaryServerInterceptor
- func TransformStreamIncomingError() grpc.StreamClientInterceptor
- func TransformStreamOutgoingError() grpc.StreamServerInterceptor
- func TransformUnaryIncomingError() grpc.UnaryClientInterceptor
- func TransformUnaryOutgoingError() grpc.UnaryServerInterceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendMetadataToOutgoingStreamContext ¶
func AppendMetadataToOutgoingStreamContext() grpc.StreamClientInterceptor
AppendMetadataToOutgoingStreamContext appends metadata to outgoing context
https://godoc.org/google.golang.org/grpc#WithStreamInterceptor
conn, err := grpc.Dial("localhost:5000", grpc.WithStreamInterceptor(AppendMetadataToOutgoingStreamContext()))
func AppendMetadataToOutgoingUnaryContext ¶
func AppendMetadataToOutgoingUnaryContext() grpc.UnaryClientInterceptor
AppendMetadataToOutgoingUnaryContext appends metadata to outgoing context
https://godoc.org/google.golang.org/grpc#WithUnaryInterceptor
conn, err := grpc.Dial("localhost:5000", grpc.WithUnaryInterceptor(AppendMetadataToOutgoingUnaryContext()))
func CountIncomingStreamRequests ¶
func CountIncomingStreamRequests() grpc.StreamServerInterceptor
func CountIncomingUnaryRequests ¶
func CountIncomingUnaryRequests() grpc.UnaryServerInterceptor
func LogOutgoingStreamRequest ¶
func LogOutgoingStreamRequest() grpc.StreamClientInterceptor
LogOutgoingStreamRequest logs client request
https://godoc.org/google.golang.org/grpc#WithStreamInterceptor
conn, err := grpc.Dial("localhost:5000", grpc.WithStreamInterceptor(LogOutgoingStreamRequest()))
func LogOutgoingUnaryRequest ¶
func LogOutgoingUnaryRequest() grpc.UnaryClientInterceptor
LogOutgoingUnaryRequest logs client request
https://godoc.org/google.golang.org/grpc#WithUnaryInterceptor
conn, err := grpc.Dial("localhost:5000", grpc.WithUnaryInterceptor(LogOutgoingUnaryRequest()))
func LogStreamRequest ¶
func LogStreamRequest() grpc.StreamServerInterceptor
LogStreamRequest returns error if Identity not set within context or user does not have required role
https://godoc.org/google.golang.org/grpc#StreamInterceptor
opts := []grpc.ServerOption{ grpc.UnaryInterceptor(LogStreamRequest(logger)), }
s := grpc.NewServer(opts...) pb.LogStreamRequest(s, &server{})
func LogUnaryRequest ¶
func LogUnaryRequest() grpc.UnaryServerInterceptor
LogUnaryRequest returns error if Identity not set within context or user does not have required role
https://godoc.org/google.golang.org/grpc#UnaryInterceptor
opts := []grpc.ServerOption{ grpc.UnaryInterceptor(LogUnaryRequest(logger)), }
s := grpc.NewServer(opts...) pb.RegisterGreeterServer(s, &server{})
func SetMetadataFromStreamRequest ¶
func SetMetadataFromStreamRequest() grpc.StreamServerInterceptor
SetMetadataFromStreamRequest updates context with metadata
https://godoc.org/google.golang.org/grpc#StreamInterceptor
opts := []grpc.ServerOption{ grpc.UnaryInterceptor(SetMetadataFromStreamRequest()), }
s := grpc.NewServer(opts...) pb.RegisterGreeterServer(s, &server{})
func SetMetadataFromUnaryRequest ¶
func SetMetadataFromUnaryRequest() grpc.UnaryServerInterceptor
SetMetadataFromUnaryRequest updates context with metadata
https://godoc.org/google.golang.org/grpc#UnaryInterceptor
opts := []grpc.ServerOption{ grpc.UnaryInterceptor(SetMetadataFromUnaryRequest()), }
s := grpc.NewServer(opts...) pb.RegisterGreeterServer(s, &server{})
func TransformStreamIncomingError ¶
func TransformStreamIncomingError() grpc.StreamClientInterceptor
TransformStreamIncomingError transforms outgoing apperrors to appropriate status codes
https://godoc.org/google.golang.org/grpc#WithStreamInterceptor
conn, err := grpc.Dial("localhost:5000", grpc.WithStreamInterceptor(TransformStreamIncomingError()))
func TransformStreamOutgoingError ¶
func TransformStreamOutgoingError() grpc.StreamServerInterceptor
TransformStreamOutgoingError transforms incoming error into app error
https://godoc.org/google.golang.org/grpc#StreamInterceptor
opts := []grpc.ServerOption{ grpc.UnaryInterceptor(TransformStreamOutgoingError()), }
s := grpc.NewServer(opts...) pb.RegisterGreeterServer(s, &server{})
func TransformUnaryIncomingError ¶
func TransformUnaryIncomingError() grpc.UnaryClientInterceptor
TransformUnaryIncomingError transforms outgoing apperrors to appropriate status codes
https://godoc.org/google.golang.org/grpc#WithUnaryInterceptor
conn, err := grpc.Dial("localhost:5000", grpc.WithUnaryInterceptor(TransformUnaryIncomingError()))
func TransformUnaryOutgoingError ¶
func TransformUnaryOutgoingError() grpc.UnaryServerInterceptor
TransformUnaryOutgoingError transforms incoming error into app error
https://godoc.org/google.golang.org/grpc#UnaryInterceptor
opts := []grpc.ServerOption{ grpc.UnaryInterceptor(TransformUnaryOutgoingError()), }
s := grpc.NewServer(opts...) pb.RegisterGreeterServer(s, &server{})
Types ¶
This section is empty.