config

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 9 Imported by: ? 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

Index

Constants

View Source
const DefaultApiTimeout = 10 * time.Second

DefaultApiTimeout bounds a single call to the Datadog API. The Datadog client falls back to http.DefaultClient when no client is configured, and that one has no timeout at all - a slow Datadog API would then block action handlers until the agent's Request-Timeout elapses (the extension answers 503 "Timeout") and stall the discovery refresh loop indefinitely.

Variables

This section is empty.

Functions

func ParseConfiguration

func ParseConfiguration()

func ValidateConfiguration

func ValidateConfiguration()

Types

type Specification

type Specification struct {
	// see https://docs.datadoghq.com/getting_started/site/#access-the-datadog-site
	SiteParameter  string `json:"siteParameter" split_words:"true" required:"true"`
	SiteUrl        string `json:"siteUrl" split_words:"true" required:"true"`
	ApiKey         string `json:"apiKey" split_words:"true" required:"true"`
	ApplicationKey string `json:"applicationKey" split_words:"true" required:"true"`
	// ApiTimeout is the timeout for a single request to the Datadog API.
	ApiTimeout time.Duration `json:"apiTimeout" split_words:"true" required:"false" default:"10s"`
	// Only used for testing:
	TestingScheme                      *string  `json:"testingScheme" split_words:"true" required:"false"`
	TestingHost                        *string  `json:"testingHost" split_words:"true" required:"false"`
	DiscoveryAttributesExcludesMonitor []string `json:"discoveryAttributesExcludesMonitor" split_words:"true" required:"false"`
}
var (
	Config Specification
)

func (*Specification) CancelDowntime added in v1.7.0

func (s *Specification) CancelDowntime(ctx context.Context, downtimeId string) (*http.Response, error)

func (*Specification) CreateDowntime added in v1.7.0

func (*Specification) GetApiTimeout added in v1.8.28

func (s *Specification) GetApiTimeout() time.Duration

GetApiTimeout returns the configured timeout, falling back to DefaultApiTimeout for Specifications that were not populated from the environment (tests, e2e).

func (*Specification) GetMonitor

func (*Specification) ListMonitors

func (*Specification) SendEvent added in v1.2.1

func (*Specification) ValidateCredentials

func (*Specification) WrapContextWithDatadogContextValues

func (s *Specification) WrapContextWithDatadogContextValues(ctx context.Context) context.Context

Jump to

Keyboard shortcuts

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