Documentation
¶
Overview ¶
Package protocols provides the implementation of the network tracer protocols
Index ¶
- Constants
- Variables
- func FromProtocolType(protocolType ProtocolType) uint8
- func GetMap(mgr *manager.Manager, name string) (*ebpf.Map, error)
- func GetSketchQuantile(sketch *ddsketch.DDSketch, percentile float64) float64
- func NSTimestampToFloat(ns uint64) float64
- func NewSketch() (*ddsketch.DDSketch, error)
- type DispatcherProgramType
- type ProgramType
- type ProtocolType
- type Stack
Constants ¶
const (
PostgresMaxTotalMessages = 0xb4
)
const RelativeAccuracy = 0.01
RelativeAccuracy defines the acceptable error in quantile values calculated by DDSketch. For example, if the actual value at p50 is 100, with a relative accuracy of 0.01 the value calculated will be between 99 and 101
Variables ¶
var ( // SketchesPool is a pool of DDSketches SketchesPool = ddsync.NewTypedPool[ddsketch.DDSketch](func() *ddsketch.DDSketch { latencies, err := NewSketch() if err != nil { return nil } return latencies }) )
Functions ¶
func FromProtocolType ¶
func FromProtocolType(protocolType ProtocolType) uint8
FromProtocolType converts a ProtocolType to its corresponding protocol number. It returns 0 if the ProtocolType is not supported.
func GetSketchQuantile ¶
GetSketchQuantile returns the value at the given percentile in the sketch
func NSTimestampToFloat ¶
NSTimestampToFloat converts a nanosec timestamp into a float nanosecond timestamp truncated to a fixed precision
Types ¶
type DispatcherProgramType ¶
type DispatcherProgramType uint32
const (
DispatcherKafkaProg DispatcherProgramType = 0x0
)
type ProgramType ¶
type ProgramType uint32
const ( ProgramHTTP ProgramType = 0x1 ProgramHTTPTermination ProgramType = 0x2 ProgramHTTP2HandleFirstFrame ProgramType = 0x3 ProgramHTTP2FrameFilter ProgramType = 0x4 ProgramHTTP2HeadersParser ProgramType = 0x5 ProgramHTTP2DynamicTableCleaner ProgramType = 0x6 ProgramHTTP2EOSParser ProgramType = 0x7 ProgramHTTP2Termination ProgramType = 0x8 ProgramKafka ProgramType = 0x9 ProgramKafkaFetchResponsePartitionParserV0 ProgramType = 0xa ProgramKafkaFetchResponsePartitionParserV12 ProgramType = 0xb ProgramKafkaFetchResponseRecordBatchParserV0 ProgramType = 0xc ProgramKafkaFetchResponseRecordBatchParserV12 ProgramType = 0xd ProgramKafkaProduceResponsePartitionParserV0 ProgramType = 0xe ProgramKafkaProduceResponsePartitionParserV9 ProgramType = 0xf ProgramKafkaTermination ProgramType = 0x10 ProgramPostgres ProgramType = 0x12 ProgramPostgresHandleResponse ProgramType = 0x13 ProgramPostgresParseMessage ProgramType = 0x14 ProgramPostgresTermination ProgramType = 0x15 ProgramRedis ProgramType = 0x16 ProgramRedisTermination ProgramType = 0x17 )
type ProtocolType ¶
type ProtocolType uint8
ProtocolType is an enum of supported protocols
const ( // Unknown is the default value, protocol was not detected Unknown ProtocolType = iota // HTTP protocol HTTP // HTTP2 protocol HTTP2 // Kafka protocol Kafka // TLS protocol TLS // Mongo protocol Mongo // Postgres protocol Postgres // AMQP protocol AMQP // Redis protocol Redis // MySQL protocol MySQL // GRPC protocol GRPC )
func Application ¶
func Application(protoNum uint8) ProtocolType
Application layer of the protocol stack.
func Encryption ¶
func Encryption(protoNum uint8) ProtocolType
Encryption layer of the protocol stack.
func (ProtocolType) String ¶
func (p ProtocolType) String() string
String returns the string representation of the protocol
type Stack ¶
type Stack struct {
API ProtocolType
Application ProtocolType
Encryption ProtocolType
}
Stack is a set of protocols detected on a connection
func (*Stack) Contains ¶
func (s *Stack) Contains(proto ProtocolType) bool
Contains returns true if the stack contains the given protocol
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package http contains the userspace portion of USM's HTTP monitoring code
|
Package http contains the userspace portion of USM's HTTP monitoring code |
|
gotls/lookup
Package lookup provides a lookup table for the protocol package.
|
Package lookup provides a lookup table for the protocol package. |
|
gotls/lookup/internal/testprogram
command
Package main provides a test program for generating lookup tables for TLS types
|
Package main provides a test program for generating lookup tables for TLS types |
|
Package telemetry provides a way to collect metrics from eBPF programs.
|
Package telemetry provides a way to collect metrics from eBPF programs. |
|
Package tls contains definitions and methods related to tags parsed from the TLS handshake
|
Package tls contains definitions and methods related to tags parsed from the TLS handshake |
|
gotls/testutil/gotls_client
command
Package main is a simple client for the gotls_server.
|
Package main is a simple client for the gotls_server. |
|
gotls/testutil/gotls_server
command
Package main is a simple client for the gotls_server.
|
Package main is a simple client for the gotls_server. |