system

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeStr is type of detector.
	TypeStr = "system"
)

Variables

This section is empty.

Functions

func NewDetector

NewDetector creates a new system metadata detector

Types

type Config added in v0.37.0

type Config struct {
	// The HostnameSources is a priority list of sources from which hostname will be fetched.
	// In case of the error in fetching hostname from source,
	// the next source from the list will be considered.(**default**: `["dns", "os"]`)
	HostnameSources []string `mapstructure:"hostname_sources"`
}

Config defines user-specified configurations unique to the system detector

func (*Config) Validate added in v0.37.0

func (cfg *Config) Validate() error

Validate config

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector is a system metadata detector

func (*Detector) Detect

func (d *Detector) Detect(_ context.Context) (resource pcommon.Resource, schemaURL string, err error)

Detect detects system metadata and returns a resource with the available ones

Jump to

Keyboard shortcuts

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