client_telemetry

package
v0.0.0-...-f1bff1d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const Version = "v0.3"

Reflects the version of the JSON encoding. Increase the minor version number for backwards-compatible changes and the major number for non- backwards compatible changes.

Variables

This section is empty.

Functions

This section is empty.

Types

type PacketCountSummary

type PacketCountSummary struct {
	Version        string                   `json:"version"`
	Total          PacketCounts             `json:"total"`
	TopByPort      map[int]*PacketCounts    `json:"top_by_port"`
	TopByInterface map[string]*PacketCounts `json:"top_by_interface"`
	TopByHost      map[string]*PacketCounts `json:"top_by_host"`

	// Maximum number of elements allowed in the TopByX maps.
	ByPortOverflowLimit      int `json:"by_port_overflow_limit"`
	ByInterfaceOverflowLimit int `json:"by_interface_overflow_limit"`
	ByHostOverflowLimit      int `json:"by_host_overflow_limit"`

	// Counts for elements in excess of the overflow limits.  Nil means
	// there was no overflow.
	ByPortOverflow      *PacketCounts `json:"by_port_overflow,omitempty"`
	ByInterfaceOverflow *PacketCounts `json:"by_interface_overflow,omitempty"`
	ByHostOverflow      *PacketCounts `json:"by_host_overflow,omitempty"`
}

func NewPacketCountSummary

func NewPacketCountSummary() *PacketCountSummary

type PacketCounts

type PacketCounts struct {
	// Flow
	Interface string `json:"interface"`
	SrcHost   string `json:"src_host"`
	DstHost   string `json:"dst_host"`
	SrcPort   int    `json:"src_port"`
	DstPort   int    `json:"dst_port"`

	// Number of events
	TCPPackets         int `json:"tcp_packets"`
	HTTPRequests       int `json:"http_requests"`
	HTTPResponses      int `json:"http_responses"`
	OversizedWitnesses int `json:"oversized_witnesses"` // These witnesses were dropped.
	TLSHello           int `json:"tls_hello"`
	HTTP2Prefaces      int `json:"http2_prefaces"`
	QUICHandshakes     int `json:"quic_handshakes"`
	Unparsed           int `json:"unparsed"`
}

We produce a set of packet counters indexed by interface, host and port number (*either* source or destination.)

func (*PacketCounts) Add

func (c *PacketCounts) Add(d PacketCounts)

func (*PacketCounts) Copy

func (c *PacketCounts) Copy() *PacketCounts

Jump to

Keyboard shortcuts

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