Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Closer ¶
type Closer interface {
Close() error
}
Closer is the interface that wraps the Close method.
type Data ¶
type Data struct { TstampNs uint64 // monotonic nsec receive timestamp Options uint8 // TCP options (TCPI_OPT_* in linux/tcp.h) RTTus uint32 // TCP RTT in microseconds MinRTTus uint32 // min TCP RTT in microseconds RTTVarus uint32 // TCP RTT variance in microseconds SndCwndBytes uint32 // TCP cwnd in bytes PacingRateBps uint64 // TCP pacing rate in bytes / second TotalRetransmits uint32 // total retransmit counter // delivery stats only available in 4.18 and later //Delivered uint32 // total delivered packets //DeliveredCE uint32 // total delivered packets acked with ECE BytesAcked uint64 // bytes acked }
A Data contains the sampled values for a flow.
func (*Data) EquivalentTo ¶
EquivalentTo returns true if all fields excluding the timestamp are the same as the given data.
type ID ¶
type ID struct { SrcIP [4]byte // source (local) IP address SrcPort uint16 // source (local) port DstIP [4]byte // dest (remote) IP address DstPort uint16 // dest (remote) port }
An ID uniquely identifies samples within a given sampler run.
type Result ¶
type Result interface {
Samples() []Sample
}
Result is the interface that wraps the Samples method.
type ResultRecycler ¶
type ResultRecycler interface {
RecycleResult(Result)
}
ResultRecycler is the interface that wraps the RecycleResult method. It should be implemented by samplers that can reuse previously allocated Results.
type Sampler ¶
Sampler is the interface that wraps the Sample method.
Samples returns a nil result if it has no more samples to return. The separate Result interface allows the conversion to a flow.Sample slice to occur concurrently.
type SamplesRecycler ¶
type SamplesRecycler interface {
RecycleSamples([]Sample)
}
SamplesRecycler is the interface that wraps the RecycleSamples method. It should be implemented by samplers that can reuse previously allocated Samples.