common

package
v0.0.0-...-32187be Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 36 Imported by: 14

Documentation

Overview

Package common provides a set of common symbols needed by different packages, to avoid circular dependencies.

Package common provides a set of common symbols needed by different packages, to avoid circular dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPythonPaths

func GetPythonPaths() []string

GetPythonPaths returns the paths (in order of precedence) from where the agent should load python modules and checks

func GetVersion

func GetVersion(w http.ResponseWriter, _ *http.Request)

GetVersion returns the version of the agent in a http response json

func GetWorkloadmetaInit

func GetWorkloadmetaInit() workloadmeta.InitHelper

GetWorkloadmetaInit provides the InitHelper for workloadmeta so it can be injected as a Param at workloadmeta comp fx injection.

func ImportConfig

func ImportConfig(oldConfigDir string, newConfigDir string, force bool) error

ImportConfig imports the agent5 configuration into the agent6 yaml config

func LoadComponents added in v0.9.0

func LoadComponents(_ secrets.Component, wmeta workloadmeta.Component, ac autodiscovery.Component, confdPath string)

LoadComponents configures several common Agent components: tagger, collector, scheduler and autodiscovery

func NewSettingsClient added in v0.9.0

func NewSettingsClient() (settings.Client, error)

NewSettingsClient returns a configured runtime settings client.

func SetupInternalProfiling

func SetupInternalProfiling(settings settings.Component, cfg config.Reader, configPrefix string)

SetupInternalProfiling is a common helper to configure runtime settings for internal profiling.

func WaitForAllConfigsFromAD

func WaitForAllConfigsFromAD(ctx context.Context, ac autodiscovery.Component) (configs []integration.Config, lastError error)

WaitForAllConfigsFromAD waits until its context expires, and then returns the full set of checks scheduled by AD.

func WaitForConfigsFromAD

func WaitForConfigsFromAD(ctx context.Context,
	checkNames []string,
	discoveryMinInstances int,
	instanceFilter string,
	ac autodiscovery.Component) (configs []integration.Config, lastError error)

WaitForConfigsFromAD waits until a count of discoveryMinInstances configs with names in checkNames are scheduled by AD, and returns the matches.

If the context is cancelled, then any accumulated, matching changes are returned, even if that is fewer than discoveryMinInstances.

Types

type TransformationFunc

type TransformationFunc func(rawData []byte) ([]byte, error)

TransformationFunc type represents transformation applicable to byte slices

Directories

Path Synopsis
Package misconfig implements misconfiguration related types and functions
Package misconfig implements misconfiguration related types and functions
path module
Package signals defines global agent signal channels
Package signals defines global agent signal channels

Jump to

Keyboard shortcuts

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