command

package
v0.0.0-...-47294c1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package command implements the top-level `agent` binary, including its subcommands.

Index

Constants

View Source
const (
	// ConfigName is the name of the config
	ConfigName = "datadog"
	// LoggerName is the name of the logger instance
	LoggerName = "CORE"
)

Variables

This section is empty.

Functions

func GetDefaultCoreBundleParams

func GetDefaultCoreBundleParams(globalParams *GlobalParams) core.BundleParams

GetDefaultCoreBundleParams returns the default params for the Core Bundle (config loaded from the "datadog" file, without secrets and logger disabled).

func MakeCommand

func MakeCommand(subcommandFactories []SubcommandFactory) *cobra.Command

MakeCommand makes the top-level Cobra command for this app.

Types

type GlobalParams

type GlobalParams struct {
	// ConfFilePath holds the path to the folder containing the configuration
	// file, to allow overrides from the command line
	ConfFilePath string

	// ExtraConfFilePath represents the paths to additional configuration files.
	ExtraConfFilePath []string

	// SysProbeConfFilePath holds the path to the folder containing the system-probe
	// configuration file, to allow overrides from the command line
	SysProbeConfFilePath string

	// LogStreamFilePath holds the path to the logstream log path
	LogStreamFilePath string

	// FleetPoliciesDirPath holds the path to the folder containing the remotely received agent
	// configuration files, to allow overrides from the command line
	FleetPoliciesDirPath string

	// NoColor is a flag to disable color output
	NoColor bool
}

GlobalParams contains the values of agent-global Cobra flags.

A pointer to this type is passed to SubcommandFactory's, but its contents are not valid until Cobra calls the subcommand's Run or RunE function.

type SubcommandFactory

type SubcommandFactory func(globalParams *GlobalParams) []*cobra.Command

SubcommandFactory is a callable that will return a slice of subcommands.

Jump to

Keyboard shortcuts

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