standalone

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package standalone is the home for a plain host: no scheduler, no kubelet. The issuer is the control plane. Liveness is "the issuer's key set refreshed recently". Grants arrive inside Clone requests or as *.jwt files dropped into a directory for pre-warming. Readiness is the Watch stream. fiberd owns a delegated cgroup subtree it was pointed at.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Cache is the verifier's JWKS cache; its refreshes are the liveness
	// signal. Nil means no issuer (development verifier). The issuer then
	// counts as reachable on a timer until told otherwise.
	Cache *grant.Cache
	// StaleTTL: silence from the issuer longer than this is unhealthy.
	StaleTTL time.Duration
	// GrantsDir, when set, is polled for *.jwt files to pre-admit.
	GrantsDir string
	Poll      time.Duration
	// CgroupRoot is the delegated cgroup v2 subtree (default
	// /sys/fs/cgroup/fiberd).
	CgroupRoot string
	// Devices is the static device set every grant's engine may drive
	// (paths or ids): the standalone home's device channel. Empty means
	// no devices.
	Devices []string
}

type Home

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

func New

func New(cfg Config) *Home

func (*Home) CgroupRoot

func (h *Home) CgroupRoot() string

func (*Home) Devices

func (h *Home) Devices(context.Context, core.Grant) (core.DeviceChannel, func(), error)

Devices: the static device set fiberd was started with, shared by every grant; nothing to release.

func (*Home) Grants

func (h *Home) Grants(ctx context.Context) (<-chan home.GrantEvent, error)

Grants polls GrantsDir (see grantdir): a new or changed *.jwt file is GrantAdded, a removed one GrantRemoved.

func (*Home) Health

func (h *Home) Health() *core.SourceHealth

func (*Home) Name

func (h *Home) Name() string

func (*Home) PublishReady

func (h *Home) PublishReady(context.Context, string, bool) error

func (*Home) Run

func (h *Home) Run(ctx context.Context)

Run keeps the liveness signal flowing: issuer key refreshes when there is an issuer, a plain timer otherwise.

func (*Home) Scope

func (h *Home) Scope() []core.ScopeClaim

Scope: a standalone host asserts nothing beyond min(lease, fence).

func (*Home) SetIssuerReachable

func (h *Home) SetIssuerReachable(reachable bool)

SetIssuerReachable is the test-only override behind fiberd's admin socket. false marks the issuer unreachable now and keeps it so. true resumes the liveness signal and marks it reachable.

Jump to

Keyboard shortcuts

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