Help us shape the future of Go! Take the 2026 Go Developer Survey

loopback

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package loopback implements port-mode routing with no TLS: the laptop default.

Like every routing adapter, it makes traffic arrive at Pando's proxy and never reaches the workload (R-023).

Index

Constants

View Source
const Kind = "loopback"

Kind is the adapter's kind string.

Variables

This section is empty.

Functions

func Info

func Info() api.KindInfo

Info describes this kind of adapter for the forms that configure one (api.KindInfo, R-261).

func Warnings added in v0.10.0

func Warnings(raw json.RawMessage) []string

Warnings returns what is worth telling someone saving this configuration, without refusing it. A stored base_url is the only one: it is accepted for compatibility but does nothing. Configuration that does not parse returns nothing here; Configure reports that as an error.

Types

type Adapter

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

Adapter serves apps on localhost ports: the laptop default.

It does nothing to the network — there is nothing to configure, because the proxy already listens and a port-mode app is reached by asking the proxy for it. Ensure therefore records intent rather than performing an action, and Observe reports what was recorded.

That is not a degenerate case of the interface; it is the interface working. Ensure/Remove/Observe describe intent, which is why they fit both an adapter that writes config files and one that has no config at all.

func New

func New() *Adapter

func (*Adapter) Capabilities

func (a *Adapter) Capabilities(context.Context) (api.RoutingCapabilities, error)

Capabilities reports port mode only, and no TLS.

Stated honestly so the planner refuses a subdomain app at plan time with PLAN_CAPABILITY_UNSUPPORTED, rather than accepting it and producing an app nobody can reach.

func (*Adapter) Category

func (a *Adapter) Category() api.Category

func (*Adapter) Configure

func (a *Adapter) Configure(_ context.Context, raw json.RawMessage) error

func (*Adapter) Edge

Edge: none. Loopback is Pando's own listeners; nothing stands in front.

func (*Adapter) Ensure

Ensure records that an app should be reachable on a port.

func (*Adapter) HealthCheck

func (a *Adapter) HealthCheck(context.Context) error

HealthCheck always succeeds: there is no external dependency to be unhealthy.

func (*Adapter) Kind

func (a *Adapter) Kind() string

func (*Adapter) Observe

func (a *Adapter) Observe(_ context.Context, h api.RouteHandle) (api.RouteState, error)

func (*Adapter) Remove

func (a *Adapter) Remove(_ context.Context, h api.RouteHandle) error

type Config

type Config struct {
	BaseURL string `json:"base_url,omitempty"`
}

Config is the adapter's configuration. There is nothing to set.

BaseURL is accepted so a configuration stored by an earlier version still loads, and is otherwise ignored. It never changed an address anyone saw: the API renders a port-mode address from the host the request reached Pando on (spec.Address, R-261), and the proxy listens on each allocated port on that same host (design 03 §4.2), so any other host is an address nothing answers on. server.external_url already names where browsers reach the install; a second setting that could disagree with it would be a guess about DNS.

Jump to

Keyboard shortcuts

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