Documentation ¶
Index ¶
- Constants
- func RegisterInterceptor(service grpc.ServiceDesc)
- func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, ...) (grpc.ClientStream, error)
- func UnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, ...) error
- type FaultInjectorInterceptor
Constants ¶
View Source
const (
FaultInjectorListenerEnv = "FAULT_INJECTOR_LISTENER"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterInterceptor ¶
func RegisterInterceptor(service grpc.ServiceDesc)
GenerateInterceptor can be used to register an interceptor for a given grpc service. If a service is not registered the interceptor methods will error out
func StreamClientInterceptor ¶
func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error)
func UnaryClientInterceptor ¶
func UnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error
Types ¶
type FaultInjectorInterceptor ¶
type FaultInjectorInterceptor interface { UnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error // Only the method is passed to the fault injection inspection StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) RegisterService(service grpc.ServiceDesc) }
func NewInterceptor ¶
func NewInterceptor(ctx context.Context, server *grpc.Server) FaultInjectorInterceptor
NewInterceptor can be used to generate a single instance of the interceptor
Click to show internal directories.
Click to hide internal directories.