networkscraper

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeStr the value of "type" key in configuration.
	TypeStr = "network"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	internal.ConfigSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct

	// Include specifies a filter on the network interfaces that should be included from the generated metrics.
	Include MatchConfig `mapstructure:"include"`
	// Exclude specifies a filter on the network interfaces that should be excluded from the generated metrics.
	Exclude MatchConfig `mapstructure:"exclude"`
}

Config relating to Network Metric Scraper.

type Factory

type Factory struct {
}

Factory is the Factory for scraper.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() internal.Config

CreateDefaultConfig creates the default configuration for the Scraper.

func (*Factory) CreateMetricsScraper

func (f *Factory) CreateMetricsScraper(
	ctx context.Context,
	_ *zap.Logger,
	config internal.Config,
) (scraperhelper.Scraper, error)

CreateMetricsScraper creates a scraper based on provided config.

type MatchConfig

type MatchConfig struct {
	filterset.Config `mapstructure:",squash"`

	Interfaces []string `mapstructure:"interfaces"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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