Documentation
¶
Index ¶
- Variables
- type RoutedInterceptor
- func (ci *RoutedInterceptor) Add(d UnaryInterceptInfo) error
- func (ci *RoutedInterceptor) AddMultiple(ds []UnaryInterceptInfo) error
- func (ci *RoutedInterceptor) InvokeStream(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, ...) (err error)
- func (ci *RoutedInterceptor) InvokeUnary(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- type ServerModule
- type UnaryInterceptInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalRoutedInterceptor = NewRoutedInterceptor()
Functions ¶
This section is empty.
Types ¶
type RoutedInterceptor ¶
type RoutedInterceptor struct {
// contains filtered or unexported fields
}
func NewRoutedInterceptor ¶
func NewRoutedInterceptor() *RoutedInterceptor
func (*RoutedInterceptor) Add ¶
func (ci *RoutedInterceptor) Add(d UnaryInterceptInfo) error
Add integrates new routed or catch-all interceptors.
func (*RoutedInterceptor) AddMultiple ¶
func (ci *RoutedInterceptor) AddMultiple(ds []UnaryInterceptInfo) error
func (*RoutedInterceptor) InvokeStream ¶
func (ci *RoutedInterceptor) InvokeStream(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (err error)
func (*RoutedInterceptor) InvokeUnary ¶
func (ci *RoutedInterceptor) InvokeUnary(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
type ServerModule ¶
type ServerModule interface { RegisterServer(*grpc.Server) InterceptMethods() []UnaryInterceptInfo }
type UnaryInterceptInfo ¶
type UnaryInterceptInfo struct { // Methods that trigger this interception handler. FullMethod []string // If there are multiple interceptors for the regarded method string, // a handler is passed along a chaing of interceptors until one party // consumes it. In this case, interception ends here. // Last, it will stop at the end of the chain. Consume bool // The function to execute on an unary request. // If nil, the default handler is executed for a routed entry. Catch-all // entries must implement a handler function. UnaryFunc grpc.UnaryServerInterceptor // The function to execute for a stream. StreamFunc grpc.StreamServerInterceptor }
Click to show internal directories.
Click to hide internal directories.