Documentation ¶
Index ¶
Constants ¶
const ( BPF_L7_PROTOCOL_UNKNOWN = iota BPF_L7_PROTOCOL_HTTP BPF_L7_PROTOCOL_AMQP BPF_L7_PROTOCOL_POSTGRES BPF_L7_PROTOCOL_HTTP2 BPF_L7_PROTOCOL_REDIS BPF_L7_PROTOCOL_KAFKA )
match with values in l7_req.c
const ( L7_PROTOCOL_HTTP = "HTTP" L7_PROTOCOL_HTTP2 = "HTTP2" L7_PROTOCOL_AMQP = "AMQP" L7_PROTOCOL_POSTGRES = "POSTGRES" L7_PROTOCOL_REDIS = "REDIS" L7_PROTOCOL_KAFKA = "KAFKA" L7_PROTOCOL_UNKNOWN = "UNKNOWN" )
for user space
const ( BPF_METHOD_UNKNOWN = iota BPF_METHOD_GET BPF_METHOD_POST BPF_METHOD_PUT BPF_METHOD_PATCH BPF_METHOD_DELETE BPF_METHOD_HEAD BPF_METHOD_CONNECT BPF_METHOD_OPTIONS BPF_METHOD_TRACE )
match with values in l7_req.c, order is important
const ( BPF_HTTP2_METHOD_UNKNOWN = iota BPF_HTTP2_METHOD_CLIENT BPF_HTTP2_METHOD_SERVER )
const ( BPF_AMQP_METHOD_UNKNOWN = iota BPF_AMQP_METHOD_PUBLISH BPF_AMQP_METHOD_DELIVER )
match with values in l7_req.c, order is important
const ( BPF_POSTGRES_METHOD_UNKNOWN = iota BPF_POSTGRES_METHOD_STATEMENT_CLOSE_OR_CONN_TERMINATE BPF_POSTGRES_METHOD_SIMPLE_QUERY BPF_POSTGRES_METHOD_EXTENDED_QUERY // for prepared statements )
match with values in l7_req.c, order is important
const ( BPF_REDIS_METHOD_UNKNOWN = iota METHOD_REDIS_COMMAND METHOD_REDIS_PUSHED_EVENT METHOD_REDIS_PING )
match with values in l7.c, order is important
const ( BPF_KAFKA_METHOD_UNKNOWN = iota METHOD_KAFKA_PRODUCE_REQUEST METHOD_KAFKA_FETCH_RESPONSE )
match with values in l7.c, order is important
const ( GET = "GET" POST = "POST" PUT = "PUT" PATCH = "PATCH" DELETE = "DELETE" HEAD = "HEAD" CONNECT = "CONNECT" OPTIONS = "OPTIONS" TRACE = "TRACE" )
for http, user space
const ( PUBLISH = "PUBLISH" DELIVER = "DELIVER" )
for rabbitmq, user space
const ( CLOSE_OR_TERMINATE = "CLOSE_OR_TERMINATE" SIMPLE_QUERY = "SIMPLE_QUERY" EXTENDED_QUERY = "EXTENDED_QUERY" )
for postgres, user space
const ( CLIENT_FRAME = "CLIENT_FRAME" SERVER_FRAME = "SERVER_FRAME" )
for http2, user space
const ( REDIS_COMMAND = "COMMAND" REDIS_PUSHED_EVENT = "PUSHED_EVENT" REDIS_PING = "PING" )
for http2, user space
const ( KAFKA_PRODUCE_REQUEST = "PRODUCE_REQUEST" KAFKA_FETCH_RESPONSE = "FETCH_RESPONSE" )
for kafka, user space
const L7_EVENT = "l7_event"
const TRACE_EVENT = "trace_event"
Variables ¶
var FirstKernelTime uint64 = 0 // nanoseconds since boot
var FirstUserspaceTime uint64 = 0
Functions ¶
This section is empty.
Types ¶
type HTTPMethodConversion ¶
type HTTPMethodConversion uint32
Custom type for the enumeration
func (HTTPMethodConversion) String ¶
func (e HTTPMethodConversion) String() string
String representation of the enumeration values
type Http2MethodConversion ¶ added in v0.3.0
type Http2MethodConversion uint32
Custom type for the enumeration
func (Http2MethodConversion) String ¶ added in v0.3.0
func (e Http2MethodConversion) String() string
String representation of the enumeration values
type KafkaMethodConversion ¶ added in v0.10.0
type KafkaMethodConversion uint32
Custom type for the enumeration
func (KafkaMethodConversion) String ¶ added in v0.10.0
func (e KafkaMethodConversion) String() string
String representation of the enumeration values
type L7Event ¶
type L7Event struct { Fd uint64 Pid uint32 Status uint32 Duration uint64 Protocol string // L7_PROTOCOL_HTTP Tls bool // Whether request was encrypted Method string Payload [1024]uint8 PayloadSize uint32 // How much of the payload was copied PayloadReadComplete bool // Whether the payload was copied completely Failed bool // Request failed WriteTimeNs uint64 // start time of write syscall Tid uint32 Seq uint32 // tcp seq num KafkaApiVersion int16 Saddr uint32 Sport uint16 Daddr uint32 Dport uint16 // This bool is actually related to aggregator logic. Means this events processing somehow failed and put back into channel for retry. // Maybe we can wrap L7Event and add this field on top. PutBack bool }
for user space
type L7Prog ¶ added in v0.5.1
type L7Prog struct {
// contains filtered or unexported fields
}
func InitL7Prog ¶ added in v0.5.1
func InitL7Prog(conf *L7ProgConfig) *L7Prog
type L7ProgConfig ¶ added in v0.5.1
type L7ProtocolConversion ¶
type L7ProtocolConversion uint32
Custom type for the enumeration
func (L7ProtocolConversion) String ¶
func (e L7ProtocolConversion) String() string
String representation of the enumeration values
type PostgresMethodConversion ¶
type PostgresMethodConversion uint32
Custom type for the enumeration
func (PostgresMethodConversion) String ¶
func (e PostgresMethodConversion) String() string
String representation of the enumeration values
type RabbitMQMethodConversion ¶
type RabbitMQMethodConversion uint32
Custom type for the enumeration
func (RabbitMQMethodConversion) String ¶
func (e RabbitMQMethodConversion) String() string
String representation of the enumeration values
type RedisMethodConversion ¶ added in v0.9.0
type RedisMethodConversion uint32
Custom type for the enumeration
func (RedisMethodConversion) String ¶ added in v0.9.0
func (e RedisMethodConversion) String() string
String representation of the enumeration values