tcp

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

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

Go to latest
Published: Dec 18, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPConf

type TCPConf struct {
	Hostport string `yaml:"hostport"`
}

TCPConf is exported to receive YAML configuration.

func (TCPConf) Instrument

func (c TCPConf) Instrument() map[string]prometheus.Collector

Instrument is a no-op to implement the `Configurer` interface.

func (TCPConf) Kind

func (c TCPConf) Kind() string

Kind returns a name that uniquely identifies the `Kind` of `Configurer`.

func (TCPConf) MakeProber

func (c TCPConf) MakeProber(_ map[string]prometheus.Collector) (probers.Prober, error)

MakeProber constructs a `TCPPProbe` object from the contents of the bound `TCPPConf` object.

func (TCPConf) UnmarshalSettings

func (c TCPConf) UnmarshalSettings(settings []byte) (probers.Configurer, error)

UnmarshalSettings takes YAML as bytes and unmarshals it to the to an TCPConf object.

type TCPProbe

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

func (TCPProbe) Kind

func (p TCPProbe) Kind() string

Kind returns a name that uniquely identifies the `Kind` of `Prober`.

func (TCPProbe) Name

func (p TCPProbe) Name() string

func (TCPProbe) Probe

func (p TCPProbe) Probe(timeout time.Duration) (bool, time.Duration)

Probe performs the configured TCP dial.

Jump to

Keyboard shortcuts

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