interceptor

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 10 Imported by: 0

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.Interceptor, error)

BuildDefault creates a standard interceptor chain without authentication. Returns interceptors in order: recovery, deadline, requestid, otel, logging, validate, errors.

func BuildDefaultWithAuth

func BuildDefaultWithAuth(auth *jwtauth.Authenticator, opts ...Option) ([]connect.Interceptor, error)

BuildDefaultWithAuth creates a standard interceptor chain with JWT authentication. 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

func WithDeadline(cfg deadline.Config) Option

WithDeadline overrides the default deadline configuration.

func WithRequestID

func WithRequestID(cfg requestid.Config) Option

WithRequestID overrides the default request ID configuration.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options configures the interceptor chain.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL