reqinfo

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package reqinfo carries the per-request facts that middleware outside the router needs once the handler has run — the matched route pattern, for access logs and telemetry — without widening chok's public API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// Route is the matched path pattern, such as /api/v1/posts/{id};
	// empty when no route matched.
	Route string
}

Info is filled in as the request travels inward.

func From

func From(ctx context.Context) *Info

From returns the request's Info, or nil outside a chok handler.

func New

func New(ctx context.Context) (context.Context, *Info)

New returns a context carrying a fresh Info.

Jump to

Keyboard shortcuts

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