Documentation ¶
Index ¶
- func AuditEventUnaryInterceptor(logger *zap.Logger, eventPairChecker audit.EventPairChecker) grpc.UnaryServerInterceptor
- func ErrorUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func EvaluationUnaryInterceptor(analyticsEnabled bool) grpc.UnaryServerInterceptor
- func FliptAcceptServerVersionFromContext(ctx context.Context) semver.Version
- func FliptAcceptServerVersionUnaryInterceptor(logger *zap.Logger) grpc.UnaryServerInterceptor
- func ForwardFliptAcceptServerVersion(ctx context.Context, req *http.Request) metadata.MD
- func ForwardFliptNamespace(ctx context.Context, req *http.Request) metadata.MD
- func ValidationUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
- func WithFliptAcceptServerVersion(ctx context.Context, version semver.Version) context.Context
- type RequestIdentifiable
- type ResponseDurationRecordable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditEventUnaryInterceptor ¶ added in v1.43.0
func AuditEventUnaryInterceptor(logger *zap.Logger, eventPairChecker audit.EventPairChecker) grpc.UnaryServerInterceptor
AuditEventUnaryInterceptor captures events and adds them to the trace span to be consumed downstream.
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(analyticsEnabled bool) grpc.UnaryServerInterceptor
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 FliptAcceptServerVersionFromContext ¶ added in v1.38.0
FliptAcceptServerVersionFromContext returns the flipt-accept-server-version from the context if it exists or the default version.
func FliptAcceptServerVersionUnaryInterceptor ¶ added in v1.38.0
func FliptAcceptServerVersionUnaryInterceptor(logger *zap.Logger) grpc.UnaryServerInterceptor
FliptAcceptServerVersionUnaryInterceptor is a grpc client interceptor that sets the flipt-accept-server-version in the context if provided in the metadata/header.
func ForwardFliptAcceptServerVersion ¶ added in v1.44.1
ForwardFliptAcceptServerVersion extracts the "x-flipt-accept-server-version"" header from an HTTP request and forwards them as grpc metadata entries.
func ForwardFliptNamespace ¶ added in v1.51.1
ForwardFliptNamespace extracts the "x-flipt-namespace" header from an HTTP request and forwards them as grpc metadata entries.
func ValidationUnaryInterceptor ¶
func ValidationUnaryInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
ValidationUnaryInterceptor validates incoming requests