proxy

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package proxy describes siding-proxy: one Traefik with the Docker provider, run as its own Compose project, through which every stack is reached by host and path.

Index

Constants

View Source
const AccessLogFlag = "--accesslog=true"

AccessLogFlag is in the command of a proxy that records its requests.

View Source
const HostGateway = "host-gateway"

HostGateway is the host alias when the Docker daemon runs in a VM: Docker's own name for the machine outside it.

View Source
const Image = "traefik:v3.7.16"

Image is the Traefik image siding-proxy runs; the devcontainer's SIDING_TRAEFIK_IMAGE is the same.

View Source
const RoutesMount = "/etc/siding/routes"

RoutesMount is where the proxy reads route files that siding ui writes.

Variables

This section is empty.

Functions

func ComposeFile

func ComposeFile(c Config, s Settings) []byte

ComposeFile renders the proxy's compose file. The constraint keeps Traefik to containers siding labelled for this proxy's network, so foreign Traefik labels on the same daemon are never exposed. The access log on stdout records only the router and the time of a request; Docker keeps it at 30 MiB at most (phase 4 design D3).

Types

type Config

type Config struct {
	Project     string // Compose project
	Container   string // container name
	Network     string // Docker network every routed service joins
	Image       string
	DefaultPort int // host port on 127.0.0.1 when setup gets no --port
}

Config names the proxy and its network. Tests use their own, so they never touch a developer's siding-proxy.

func Default

func Default() Config

Default is the proxy of a real installation.

type Settings

type Settings struct {
	Port    int
	Machine string
	// Budget is the memory budget in bytes, 0 for the default.
	Budget int64
	// Builds is the number of build slots, 0 for the default.
	Builds int
	// Idle is the idle threshold in seconds, 0 for off, nil for the default.
	Idle *int64
	// RoutesDir is the directory on this machine with the route files of siding ui.
	RoutesDir string
	// HostAlias is what host.docker.internal resolves to in the proxy: the proxy network's
	// gateway when that is an address of this machine, else HostGateway (design D2).
	HostAlias string
}

Settings are what one setup chooses for the proxy.

Jump to

Keyboard shortcuts

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