env

package
v0.85.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 12 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package env provides the environment variables for the installer.

Index

Constants

View Source
const (
	// APMInstrumentationEnabledAll enables APM instrumentation for all containers.
	APMInstrumentationEnabledAll = "all"
	// APMInstrumentationEnabledDocker enables APM instrumentation for Docker containers.
	APMInstrumentationEnabledDocker = "docker"
	// APMInstrumentationEnabledHost enables APM instrumentation for the host.
	APMInstrumentationEnabledHost = "host"
	// APMInstrumentationEnabledIIS enables APM instrumentation for .NET applications running on IIS on Windows
	APMInstrumentationEnabledIIS = "iis"
	// APMInstrumentationNotSet is the default value when the environment variable is not set.
	APMInstrumentationNotSet = "not_set"
)

Variables

This section is empty.

Functions

func DetectCentos6

func DetectCentos6() bool

DetectCentos6 checks if the machine the installer is currently on is running centos 6

func ValidateAPMInstrumentationEnabled

func ValidateAPMInstrumentationEnabled(value string) error

ValidateAPMInstrumentationEnabled validates the value of the DD_APM_INSTRUMENTATION_ENABLED environment variable.

Types

type ApmLibLanguage

type ApmLibLanguage string

ApmLibLanguage is a language defined in DD_APM_INSTRUMENTATION_LIBRARIES env var

type ApmLibVersion

type ApmLibVersion string

ApmLibVersion is the version of the library defined in DD_APM_INSTRUMENTATION_LIBRARIES env var

type Env

type Env struct {
	APIKey                string
	Site                  string
	RemoteUpdates         bool
	OTelCollectorEnabled  bool
	ProcessManagerEnabled bool
	ConfigID              string

	Mirror                      string
	RegistryOverride            string
	RegistryAuthOverride        string
	RegistryUsername            string
	RegistryPassword            string
	RegistryOverrideByImage     map[string]string
	RegistryAuthOverrideByImage map[string]string
	RegistryUsernameByImage     map[string]string
	RegistryPasswordByImage     map[string]string

	DefaultPackagesInstallOverride map[string]bool
	DefaultPackagesVersionOverride map[string]string

	ApmLibraries map[ApmLibLanguage]ApmLibVersion

	AgentMajorVersion string
	AgentMinorVersion string
	AgentDistChannel  string
	AgentPipelineID   string

	MsiParams MsiParamsEnv // windows only

	InstallScript InstallScriptEnv

	Tags     []string
	Hostname string

	HTTPProxy  string
	HTTPSProxy string
	NoProxy    string

	InfrastructureMode string

	AppKey              string
	PAREnabled          bool
	PARActionsAllowlist string

	IsCentos6 bool

	IsFromDaemon bool

	// FIPSMode requests the FIPS-compliant flavor of any package downloaded by the
	// installer. When true, only manifests annotated with com.datadoghq.package.flavor=fips
	// are eligible, with no fallback to the base flavor.
	FIPSMode bool
}

Env contains the configuration for the installer.

func FromEnv

func FromEnv() *Env

FromEnv returns an Env struct with values from the environment.

func (*Env) GetAgentVersion added in v0.65.0

func (e *Env) GetAgentVersion() string

GetAgentVersion returns the agent version from the environment variables.

func (*Env) HTTPClient

func (e *Env) HTTPClient() *http.Client

HTTPClient returns an HTTP client with the proxy settings from the environment.

func (*Env) HasDefaultRegistryAuthOverride added in v0.78.0

func (e *Env) HasDefaultRegistryAuthOverride() bool

func (*Env) HasDefaultRegistryOverride added in v0.78.0

func (e *Env) HasDefaultRegistryOverride() bool

func (*Env) HasDefaultRegistryPassword added in v0.78.0

func (e *Env) HasDefaultRegistryPassword() bool

func (*Env) HasDefaultRegistryUsername added in v0.78.0

func (e *Env) HasDefaultRegistryUsername() bool

func (*Env) ToEnv

func (e *Env) ToEnv() []string

ToEnv returns a slice of environment variables from the Env struct.

type InstallScriptEnv

type InstallScriptEnv struct {
	// SSI
	APMInstrumentationEnabled string

	// APM features toggles
	RuntimeMetricsEnabled       *bool
	LogsInjection               *bool
	APMTracingEnabled           *bool
	ProfilingEnabled            string
	DataStreamsEnabled          *bool
	AppsecEnabled               *bool
	IastEnabled                 *bool
	DataJobsEnabled             *bool
	AppsecScaEnabled            *bool
	TracerLogsCollectionEnabled *bool

	// RUM configuration
	RumEnabled               *bool
	RumApplicationID         string
	RumClientToken           string
	RumRemoteConfigurationID string
	RumSite                  string
}

InstallScriptEnv contains the environment variables for the install script.

func (*InstallScriptEnv) ToEnv added in v0.65.0

func (e *InstallScriptEnv) ToEnv(env []string) []string

ToEnv returns a slice of environment variables from the InstallScriptEnv struct

type MsiParamsEnv added in v0.67.0

type MsiParamsEnv struct {
	AgentUserName            string
	AgentUserPassword        string
	ProjectLocation          string
	ApplicationDataDirectory string
	// AgentUserKeepRights opts the installer out of re-applying the ddagentuser
	// SeDeny*LogonRight assignments. Accepts MSI-style truthy values (1/true/yes).
	AgentUserKeepRights string
}

MsiParamsEnv contains the environment variables for options that are passed to the MSI.

func (*MsiParamsEnv) ToEnv added in v0.67.0

func (e *MsiParamsEnv) ToEnv(env []string) []string

ToEnv returns a slice of environment variables from the MsiParamsEnv struct.

Jump to

Keyboard shortcuts

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