Documentation
¶
Overview ¶
Package interceptor provides default interceptor chain builders for Connect RPC services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDefault ¶
func BuildDefault(opts ...Option) ([]connect.ServerInterceptor, error)
BuildDefault creates a standard server interceptor chain without authentication. Pass the result to connect.NewServer. Returns interceptors in order: recovery, deadline, requestid, otel, logging, validate, errors.
func BuildDefaultWithAuth ¶
func BuildDefaultWithAuth(auth *jwtauth.Authenticator, opts ...Option) ([]connect.ServerInterceptor, error)
BuildDefaultWithAuth creates a standard server interceptor chain with JWT authentication. Pass the result to connect.NewServer. Returns interceptors in order: recovery, deadline, requestid, otel, logging, jwtauth, validate, errors. Returns error if auth is nil.
Types ¶
type Option ¶
type Option func(*Options)
Option configures the interceptor builder.
func WithDeadline ¶
WithDeadline overrides the default deadline configuration.
func WithRequestID ¶
WithRequestID overrides the default request ID configuration.