fiber

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIntegrationDisabled = ewrap.New("fiber integration requires the 'fiber_integration' build tag")

ErrIntegrationDisabled indicates that the fiber middleware was built without fiber support.

Functions

func DefaultContextExtractor

func DefaultContextExtractor(any) []hyperlogger.Field

DefaultContextExtractor is a no-op context extractor when fiber integration is not enabled.

Types

type Config

type Config struct {
	Logger           hyperlogger.Logger
	IncludeHeaders   []string
	ContextExtractor func(ctx any) []hyperlogger.Field
	CaptureRequestID bool
	LatencyFieldName string
	StatusFieldName  string
}

Config defines the configuration options for the Fiber middleware.

type Handler

type Handler func(ctx any) error

Handler defines the signature for a Fiber middleware handler function.

func Middleware

func Middleware(cfg Config) Handler

Middleware returns a stub fiber middleware when the fiber build tag is not provided.

Jump to

Keyboard shortcuts

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