Documentation ¶
Index ¶
- func AuditUnaryInterceptor(logger *zap.Logger) grpc.UnaryServerInterceptor
- func CacheUnaryInterceptor(cache cache.Cacher, logger *zap.Logger) grpc.UnaryServerInterceptor
- func ErrorUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func EvaluationUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func ValidationUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditUnaryInterceptor ¶ added in v1.21.0
func AuditUnaryInterceptor(logger *zap.Logger) grpc.UnaryServerInterceptor
AuditUnaryInterceptor sends audit logs to configured sinks upon successful RPC requests for auditable events.
func CacheUnaryInterceptor ¶
CacheUnaryInterceptor caches the response of a request if the request is cacheable. TODO: we could clean this up by using generics in 1.18+ to avoid the type switch/duplicate code.
func ErrorUnaryInterceptor ¶
func ErrorUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
ErrorUnaryInterceptor intercepts known errors and returns the appropriate GRPC status code
func EvaluationUnaryInterceptor ¶
func EvaluationUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
EvaluationUnaryInterceptor sets required request/response fields. Note: this should be added before any caching interceptor to ensure the request id/response fields are unique.
func ValidationUnaryInterceptor ¶
func ValidationUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
ValidationUnaryInterceptor validates incoming requests
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.