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

edge

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package edge runs what routing adapters need in front of Pando (R-174).

A routing adapter describes an edge — Traefik, cloudflared — as an api.EdgePlan; the default runtime adapter runs it. This package is the join, and the only place the two meet: neither adapter reaches into the other (design 03 §4.4).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateIssuer

type CertificateIssuer interface {
	Ensure(ctx context.Context, plan *api.CertificateIssue) ([]api.EdgeCertificate, error)
}

CertificateIssuer issues an edge's certificates and returns those it holds.

type Service

type Service struct {
	Registry      *api.Registry
	ProxyUpstream string
	Logger        *zap.Logger

	// Certificates issues what an edge asks Pando to (EdgePlan.Issue):
	// *edgecert.Issuer. Nil refuses such an edge.
	Certificates CertificateIssuer
	Clock        clock.Clock
	// contains filtered or unexported fields
}

Service applies every routing adapter's edge through the default runtime.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) error

Reconcile makes the edges that exist the edges the routing adapters ask for.

Idempotent: a matching edge is left alone, a changed plan recreates it, and an edge nothing asks for any more is removed. One adapter's broken edge does not stop another's from being applied.

func (*Service) Run

func (s *Service) Run(ctx context.Context, interval time.Duration)

Run reconciles at start and then every interval until ctx ends.

func (*Service) Status

func (s *Service) Status(ref string) (Status, bool)

Status reports the last result for a routing adapter's edge. false means that adapter has no edge.

type Status

type Status struct {
	// Running is whether the edge was running when last looked at.
	Running bool `json:"running"`

	// Message says what is wrong, when something is. Operator detail — a
	// port, an image — so the handler shows it only to whoever may change
	// the adapter.
	Message string `json:"message,omitempty"`

	CheckedAt time.Time `json:"checked_at"`
}

Status is the last thing Pando found out about one routing adapter's edge.

Jump to

Keyboard shortcuts

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