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

loopback

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 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).

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 is where the proxy can be reached, for display.
	BaseURL string `json:"base_url,omitempty"`
}

Config is the adapter's configuration.

Jump to

Keyboard shortcuts

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