networkpath

package
v0.0.0-...-ad40689 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package networkpath defines the agent corecheck for the Network Path integration

Index

Constants

View Source
const CheckName = "network_path"

CheckName defines the name of the Network Path check

Variables

This section is empty.

Functions

func Factory

func Factory(telemetry telemetryComp.Component) optional.Option[func() check.Check]

Factory creates a new check factory

Types

type Check

type Check struct {
	core.CheckBase
	// contains filtered or unexported fields
}

Check doesn't need additional fields

func (*Check) Configure

func (c *Check) Configure(senderManager sender.SenderManager, integrationConfigDigest uint64, rawInstance integration.Data, rawInitConfig integration.Data, source string) error

Configure the networkpath check

func (*Check) Interval

func (c *Check) Interval() time.Duration

Interval returns the scheduling time for the check

func (*Check) Run

func (c *Check) Run() error

Run executes the check

func (*Check) SendNetPathMDToEP

func (c *Check) SendNetPathMDToEP(sender sender.Sender, path payload.NetworkPath) error

SendNetPathMDToEP sends a traced network path to EP

type CheckConfig

type CheckConfig struct {
	DestHostname          string
	DestPort              uint16
	SourceService         string
	DestinationService    string
	MaxTTL                uint8
	Protocol              payload.Protocol
	Timeout               time.Duration
	MinCollectionInterval time.Duration
	Tags                  []string
	Namespace             string
}

CheckConfig defines the configuration of the Network Path integration

func NewCheckConfig

func NewCheckConfig(rawInstance integration.Data, rawInitConfig integration.Data) (*CheckConfig, error)

NewCheckConfig builds a new check config

type InitConfig

type InitConfig struct {
	MinCollectionInterval int64 `yaml:"min_collection_interval"`
	TimeoutMs             int64 `yaml:"timeout"`
	MaxTTL                uint8 `yaml:"max_ttl"`
}

InitConfig is used to deserialize integration init config

type InstanceConfig

type InstanceConfig struct {
	DestHostname string `yaml:"hostname"`

	DestPort uint16 `yaml:"port"`

	Protocol string `yaml:"protocol"`

	SourceService      string `yaml:"source_service"`
	DestinationService string `yaml:"destination_service"`

	MaxTTL uint8 `yaml:"max_ttl"`

	TimeoutMs int64 `yaml:"timeout"`

	MinCollectionInterval int `yaml:"min_collection_interval"`

	Tags []string `yaml:"tags"`
}

InstanceConfig is used to deserialize integration instance config

type Number

type Number interface {
	~int | ~int64 | ~uint8
}

Number is a type that is used to make a generic version of the firstNonZero function

Jump to

Keyboard shortcuts

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