utils

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package utils holds the plumbing the Tunnel and Proxy endpoint declarations share.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Addr       string
	Lis        net.Listener
	Middleware []Middleware
}

Endpoint is what Tunnel and Proxy share: where to serve (an address to bind, or a listener the caller already bound — TLS, a systemd socket, ":0" in a test) and the middleware around the handler.

func (Endpoint) Configured

func (e Endpoint) Configured() bool

func (Endpoint) Wrap

func (e Endpoint) Wrap(handler http.Handler) http.Handler

Wrap applies the middleware, first-listed outermost.

type Middleware

type Middleware func(http.Handler) http.Handler

Middleware wraps an endpoint's handler — auth on the tunnel, instrumentation on the proxy, anything http.

Jump to

Keyboard shortcuts

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