osenv

package
v0.0.0-...-f88c608 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 8 Imported by: 202

Documentation

Index

Constants

View Source
const (
	JujuControllerEnvKey    = "JUJU_CONTROLLER"
	JujuModelEnvKey         = "JUJU_MODEL"
	JujuXDGDataHomeEnvKey   = "JUJU_DATA"
	JujuLoggingConfigEnvKey = "JUJU_LOGGING_CONFIG"

	// JujuFeatureFlagEnvKey is used to enable prototype/developer only
	// features that we don't want to expose by default to the general user.
	// It is propagated to as an environment variable to all agents.
	JujuFeatureFlagEnvKey = "JUJU_DEV_FEATURE_FLAGS"

	// JujuFeatures is used to allow the general user to opt in to new, polished
	// features (primarily CLI enhancements) that may break backwards compatibility
	// so cannot be enabled by default until the next major Juju revision.
	// The features enabled by this flag are expected to have full doc available.
	JujuFeatures = "JUJU_FEATURES"

	// JujuStartupLoggingConfigEnvKey if set is used to configure the initial
	// logging before the command objects are even created to allow debugging
	// of the command creation and initialisation process.
	JujuStartupLoggingConfigEnvKey = "JUJU_STARTUP_LOGGING_CONFIG"

	// Registry key containing juju related information
	JujuRegistryKey = `HKLM:\SOFTWARE\juju-core`

	// Registry value where the jujud password resides
	JujuRegistryPasswordKey = `jujud-password`

	// TODO(thumper): 2013-09-02 bug 1219630
	// As much as I'd like to remove JujuContainerType now, it is still
	// needed as MAAS still needs it at this stage, and we can't fix
	// everything at once.
	JujuContainerTypeEnvKey = "JUJU_CONTAINER_TYPE"

	// JujuStatusIsoTimeEnvKey is the env var which if true, will cause status
	// timestamps to be written in RFC3339 format.
	JujuStatusIsoTimeEnvKey = "JUJU_STATUS_ISO_TIME"

	// XDGDataHome is a path where data for the running user
	// should be stored according to the xdg standard.
	XDGDataHome = "XDG_DATA_HOME"
)
View Source
const (
	// DirectorySubPathSSH is the sub directory under Juju home that holds ssh
	// related information for the Juju client.
	DirectorySubPathSSH = "ssh"
)

Variables

This section is empty.

Functions

func FeatureFlags

func FeatureFlags() map[string]string

FeatureFlags returns a map that can be merged with os.Environ.

func JujuXDGDataHome

func JujuXDGDataHome() string

JujuXDGDataHome returns the current juju home.

func JujuXDGDataHomeDir

func JujuXDGDataHomeDir() string

JujuXDGDataHomeDir returns the directory where juju should store application-specific files

func JujuXDGDataHomeFS

func JujuXDGDataHomeFS() fs.FS

JujuXDGDDataHomeFS returns a file system rooted at home directory for the Juju data directory.

func JujuXDGDataHomePath

func JujuXDGDataHomePath(names ...string) string

JujuXDGDataHomePath returns the path to a file in the current juju home.

func JujuXDGDataSSHFS

func JujuXDGDataSSHFS() fs.FS

JujuXDGDataSSHFS return a file system rooted at the ssh directory in the Juju data directory.

func MergeEnvironment

func MergeEnvironment(current, newValues map[string]string) map[string]string

MergeEnvironment will return the current environment updated with all the values from newValues. If current is nil, a new map is created. If current is not nil, it is mutated.

func SetJujuXDGDataHome

func SetJujuXDGDataHome(newJujuXDGDataHomeHome string) string

SetJujuXDGDataHome sets the value of juju home and returns the current one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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