Documentation
¶
Overview ¶
Package factory selects a state archive implementation from environment configuration.
Index ¶
Constants ¶
const ( // BackendEnvVar chooses the archive implementation. BackendEnvVar = "RADIUS_STATE_BACKEND" // ArchivePlainHTTPEnvVar enables HTTP for a local OCI registry. ArchivePlainHTTPEnvVar = "RADIUS_ARCHIVE_PLAIN_HTTP" // StateRegistryEnvVar configures the OCI repository used by rad startup and shutdown. StateRegistryEnvVar = "RADIUS_STATE_REGISTRY" // GraphRegistryEnvVar configures the OCI repository used by modeled graph output. GraphRegistryEnvVar = "RADIUS_GRAPH_REGISTRY" )
Variables ¶
This section is empty.
Functions ¶
func NewGraphArchive ¶
func NewGraphArchive(registry string) statearchive.Archive
NewGraphArchive returns the archive for modeled graph output. OCI is selected when a registry is configured or BackendEnvVar is "oci"; otherwise git is used so existing GitHub Actions workflows keep working without any configuration. Set BackendEnvVar to "git" to force the git backend.
func NewStateArchive ¶
func NewStateArchive(registry string) statearchive.Archive
NewStateArchive returns the archive for rad startup and rad shutdown. OCI is the default: when BackendEnvVar is unset, OCI is selected even without a registry, so a missing RADIUS_STATE_REGISTRY surfaces as a configuration error from Archive.Open rather than silently falling back to git. Set BackendEnvVar to "git" to opt into the git backend.
Types ¶
This section is empty.