hosttags

package
v0.0.0-...-0f01a6b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package hosttags provides a mechanism to fetch host tags for metrics in the Datadog Agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostTagProvider

type HostTagProvider struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

HostTagProvider is a struct that provides host tags for metrics.

func NewHostTagProvider

func NewHostTagProvider() *HostTagProvider

NewHostTagProvider creates a new HostTagProvider with the default expected tags duration from the configuration.

func NewHostTagProviderWithDuration

func NewHostTagProviderWithDuration(duration time.Duration) *HostTagProvider

NewHostTagProviderWithDuration creates a new HostTagProvider with a specified duration for host tags expiration.

func (*HostTagProvider) GetHostTags

func (p *HostTagProvider) GetHostTags() []string

GetHostTags returns the current host tags. If the tags have expired, it returns an empty slice.

Jump to

Keyboard shortcuts

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