decoder

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSkipLabelSet = errors.New("this label set should be skipped")

ErrSkipLabelSet instructs exporter to skip label set

Functions

This section is empty.

Types

type CGroup added in v1.2.3

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

CGroup is a decoder that transforms cgroup id to path in cgroupfs

func (*CGroup) Decode added in v1.2.3

func (c *CGroup) Decode(in []byte, _ config.Decoder) ([]byte, error)

Decode transforms cgroup id to path in cgroupfs

type Decoder

type Decoder interface {
	Decode([]byte, config.Decoder) ([]byte, error)
}

Decoder transforms byte field value into a byte value representing string to either use as an input for another Decoder or to use as the final label value for Prometheus metrics

type Dname added in v1.2.0

type Dname struct{}

Dname is a decoder that decodes DNS qname wire format

func (*Dname) Decode added in v1.2.0

func (d *Dname) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode transforms wire format into string

type InetIP added in v1.2.0

type InetIP struct{}

InetIP is a decoder that transforms an ip byte representation into a string

func (*InetIP) Decode added in v1.2.0

func (i *InetIP) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode transforms an ip byte representation into a string

type KSym

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

KSym is a decoder that transforms kernel address to a function name

func (*KSym) Decode

func (k *KSym) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode transforms kernel address to a function name

type MajorMinor

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

MajorMinor is a decoder that transforms minormajor device id into name

func (*MajorMinor) Decode

func (m *MajorMinor) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode transforms minormajor device id into device name like sda2

type Regexp

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

Regexp is a decoder that only allows inputs matching regexp

func (*Regexp) Decode

func (r *Regexp) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode only allows inputs matching regexp

type Set

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

Set is a set of Decoders that may be applied to produce a label

func NewSet

func NewSet() *Set

NewSet creates a Set with all known decoders

func (*Set) Decode

func (s *Set) Decode(in []byte, label config.Label) ([]byte, error)

Decode transforms input byte field into a string according to configuration

func (*Set) DecodeLabels

func (s *Set) DecodeLabels(in []byte, labels []config.Label) ([]string, error)

DecodeLabels transforms eBPF map key bytes into a list of label values according to configuration

type StaticMap

type StaticMap struct{}

StaticMap is a decoded that maps values according to a static map

func (*StaticMap) Decode

func (s *StaticMap) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode maps values according to a static map

type String

type String struct{}

String is a decoder that decodes strings coming from the kernel

func (*String) Decode

func (s *String) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode transforms byte slice from the kernel into string

type UInt

type UInt struct{}

UInt is a decoder that transforms unsigned integers into their string values

func (*UInt) Decode

func (u *UInt) Decode(in []byte, conf config.Decoder) ([]byte, error)

Decode transforms unsigned integers into their string values

Jump to

Keyboard shortcuts

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