experimental

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package experimental is the single platform gate for features hidden at launch.

Index

Constants

View Source
const (
	MaturityExperimental = "experimental"
	MaturityBeta         = "beta"
)

Maturity labels how settled a gated feature is.

View Source
const EnvVar = "APP_EXPERIMENTAL"

EnvVar names the env var holding the comma separated enabled features.

Variables

This section is empty.

Functions

func DisabledMessage

func DisabledMessage(f Feature) string

DisabledMessage is the operator-facing text for a gated surface.

func Enabled

func Enabled(f Feature) bool

Enabled reports whether f is switched on. The environment is read once.

func EnabledByEnv

func EnabledByEnv(f Feature) bool

EnabledByEnv reports whether the environment alone switches f on.

func EnvHint

func EnvHint(f Feature) string

EnvHint is the exact line to set and how to apply it.

func Parse

func Parse(s string) (map[Feature]bool, error)

Parse turns a comma separated list into a feature set, rejecting unknown keys.

func Reset

func Reset()

Reset forgets the cached environment, for tests.

func Set

func Set(fs ...Feature)

Set replaces the enabled set, for tests.

func SetRuntime

func SetRuntime(f Feature, on bool)

SetRuntime records the Settings choice for a toggleable feature. It never turns off a feature the environment enables.

func Toggleable

func Toggleable(f Feature) bool

Toggleable reports whether an operator may switch f on from Settings at runtime, on top of the environment.

func Validate

func Validate() error

Validate reports an unknown feature key in the environment.

Types

type Feature

type Feature string

Feature names a gated capability.

const (
	// AIChat is the in-app AI assistant chat.
	AIChat Feature = "ai-chat"
	// AIModels is GPU model hosting.
	AIModels Feature = "ai-models"
	// LoadBalancer is multi-replica load balancing.
	LoadBalancer Feature = "load-balancer"
	// IaC is platform as code (plan, apply, export).
	IaC Feature = "iac"
	// CloudflareTunnel is the Cloudflare tunnel integration.
	CloudflareTunnel Feature = "cloudflare-tunnel"
	// AccessRoles is stored roles, the guest role and per-environment grants.
	AccessRoles Feature = "access-roles"
	// GlobalEnvironments is instance-wide typed environments and the environment switcher.
	GlobalEnvironments Feature = "global-environments"
	// AIControl is the Settings switch that governs agent and AI access.
	AIControl Feature = "ai-control"
	// ResourceAdvisor is the beta resource advisor: limit, tuning and idle suggestions.
	ResourceAdvisor Feature = "resource-advisor"
	// CLIConsole is the dashboard's web console for the platform CLI (never a host shell).
	CLIConsole Feature = "cli-console"
	// MobileAPI is phone pairing, device tokens and the mobile overview endpoint.
	MobileAPI Feature = "mobile-api"
	// SAMLSCIM is the interim hand-built SAML sign-in and SCIM provisioning, off until it moves onto the library's native implementation.
	SAMLSCIM Feature = "saml-scim"
)

func All

func All() []Feature

All returns every gated feature, sorted.

func EnabledList

func EnabledList() []Feature

EnabledList returns the enabled features, sorted.

func ToggleableList

func ToggleableList() []Feature

ToggleableList returns every feature Settings may switch, sorted.

type Info

type Info struct {
	ID       Feature
	Name     string
	Summary  string
	DocsPath string
	Maturity string
	// RestartRequired is true when startup wires something (routes, listeners,
	// reconcilers, goroutines) that a runtime switch could not add or remove.
	RestartRequired bool
}

Info describes a gated feature for operators. It is the single place names and summaries live, so the API, CLI and dashboard never drift.

func Describe

func Describe(f Feature) Info

Describe returns the operator-facing description of f. Only the Settings toggleable features can change at runtime; every other one is wired at startup (routes, reconcilers, goroutines), so it needs a restart.

Jump to

Keyboard shortcuts

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