Documentation ¶
Index ¶
- func AppendMetadataToOutgoingStreamContext() grpc.StreamClientInterceptor
- func AppendMetadataToOutgoingUnaryContext() grpc.UnaryClientInterceptor
- func LogOutgoingStreamRequest(logger *log.Logger) grpc.StreamClientInterceptor
- func LogOutgoingUnaryRequest(logger *log.Logger) grpc.UnaryClientInterceptor
- func LogStreamRequest(logger *log.Logger) grpc.StreamServerInterceptor
- func LogUnaryRequest(logger *log.Logger) grpc.UnaryServerInterceptor
- func SetMetadataFromStreamRequest() grpc.StreamServerInterceptor
- func SetMetadataFromUnaryRequest() 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 LogOutgoingStreamRequest ¶
func LogOutgoingStreamRequest(logger *log.Logger) 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(logger *log.Logger) 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(logger *log.Logger) 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(logger *log.Logger) 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{})
Types ¶
This section is empty.