Documentation
¶
Overview ¶
Package server implements the server for the interceptors package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthInterceptor ¶
type AuthInterceptor struct {
// contains filtered or unexported fields
}
AuthInterceptor validates JWT tokens from other nodes
func NewAuthInterceptor ¶
func NewAuthInterceptor(verifier authn.JWTVerifier, logger *zap.Logger) *AuthInterceptor
func (*AuthInterceptor) Stream ¶
func (i *AuthInterceptor) Stream() grpc.StreamServerInterceptor
Stream returns a grpc.StreamServerInterceptor that validates JWT tokens
func (*AuthInterceptor) Unary ¶
func (i *AuthInterceptor) Unary() grpc.UnaryServerInterceptor
Unary returns a grpc.UnaryServerInterceptor that validates JWT tokens
type LoggingInterceptor ¶
type LoggingInterceptor struct {
// contains filtered or unexported fields
}
LoggingInterceptor logs errors for unary and stream RPCs.
func NewLoggingInterceptor ¶
func NewLoggingInterceptor(logger *zap.Logger) (*LoggingInterceptor, error)
NewLoggingInterceptor creates a new instance of LoggingInterceptor.
func (*LoggingInterceptor) Stream ¶
func (i *LoggingInterceptor) Stream() grpc.StreamServerInterceptor
Stream intercepts stream RPC calls to log errors.
func (*LoggingInterceptor) Unary ¶
func (i *LoggingInterceptor) Unary() grpc.UnaryServerInterceptor
Unary intercepts unary RPC calls to log errors.
type OpenConnectionsInterceptor ¶ added in v0.2.3
type OpenConnectionsInterceptor struct{}
OpenConnectionsInterceptor reports open connections for unary and stream RPCs.
func NewOpenConnectionsInterceptor ¶ added in v0.2.3
func NewOpenConnectionsInterceptor() (*OpenConnectionsInterceptor, error)
NewOpenConnectionsInterceptor creates a new instance of OpenConnectionsInterceptor.
func (*OpenConnectionsInterceptor) Stream ¶ added in v0.2.3
func (i *OpenConnectionsInterceptor) Stream() grpc.StreamServerInterceptor
Stream intercepts stream RPC calls to log errors.
func (*OpenConnectionsInterceptor) Unary ¶ added in v0.2.3
func (i *OpenConnectionsInterceptor) Unary() grpc.UnaryServerInterceptor
Unary intercepts unary RPC calls to log errors.