swarms

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package swarms resolves an application's destination to something that can apply to it.

This is the seam Phase 3 replaces with multi-swarm through swarmcli-rbac-proxy. Per D2 the OSS default resolves exactly one swarm: the one this controller runs in, reached over the docker.sock it is mounted with.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Active

func Active() string

Active names the registry in force, for startup logging.

func Register

func Register(name string, r Registry)

Register installs r as the swarm registry, replacing whatever was there. Call it from an init().

Types

type Registry

type Registry interface {
	// Backend returns the backend for the named swarm. The empty name means
	// the swarm this controller runs in.
	//
	// Implementations return the same backend for the same name rather than
	// reconnecting per call: the reconcile loop asks on every tick.
	Backend(ctx context.Context, swarm string) (charts.Backend, error)
}

Registry resolves a swarm name to a backend.

It hands back a charts.Backend rather than an interface of our own. swarmcli-cd is built on the chart engine — charts.NewEngineWith takes any Backend, which is what makes a controller-supplied applier possible at all — and a fourteen-method pass-through would buy nothing but a second definition to keep in step with CE's.

func Get

func Get() Registry

Get returns the registry in force.

Jump to

Keyboard shortcuts

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