config

package
v0.0.0-...-2feb83d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package config implements a component to handle trace-agent configuration. This component temporarily wraps pkg/trace/config.

This component initializes pkg/config based on the bundle params, and will return the same results as that package. This is to support migration to a component architecture. When no code still uses pkg/config, that package will be removed.

The mock component does nothing at startup, beginning with an empty config. It also overwrites the pkg/config.SystemProbe for the duration of the test.

Index

Constants

View Source
const DefaultLogFilePath = "/var/log/datadog/trace-agent.log"

DefaultLogFilePath is where the agent will write logs if not overridden in the conf

Variables

This section is empty.

Functions

func LoadConfigFile

func LoadConfigFile(path string, c corecompcfg.Component) (*config.AgentConfig, error)

LoadConfigFile returns a new configuration based on the given path. The path must not necessarily exist and a valid configuration can be returned based on defaults and environment variables. If a valid configuration can not be obtained, an error is returned.

func Module

func Module() fxutil.Module

Module defines the fx options for this component.

func SetHandler

func SetHandler() http.Handler

SetHandler returns handler for runtime configuration changes.

Types

type Component

type Component interface {
	// Warnings returns config warnings collected during setup.
	Warnings() *config.Warnings

	// SetHandler returns a handler for runtime configuration changes.
	SetHandler() http.Handler

	// GetConfigHandler returns a handler to fetch the runtime configuration.
	GetConfigHandler() http.Handler

	// SetMaxMemCPU
	SetMaxMemCPU(isContainerized bool)

	// Object returns wrapped config
	Object() *traceconfig.AgentConfig
}

Component is the component type.

type Params

type Params struct {
	// FailIfAPIKeyMissing controls if the Agent should fail if the API key is missing from the config.
	FailIfAPIKeyMissing bool
}

Params defines the parameters for the config component.

Jump to

Keyboard shortcuts

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