Documentation
¶
Overview ¶
Package httpflow collects http(s) request flow
Index ¶
- Constants
- func ConnNotNeedToFilter(conn ConnectionInfo) bool
- func CreateTracePoint(traceInfo *tracing.TraceInfo, httpStat *HTTPReqFinishedInfo) (*client.Point, error)
- func FindHTTPURI(payload string) (string, bool)
- func HTTPMethodInt(method int) string
- func HTTPMethodString(method string) int
- func NewHTTPFlowManger(constEditor []manager.ConstantEditor, bmaps map[string]*ebpf.Map, ...) (*manager.Manager, *sysmonitor.UprobeRegister, error)
- func ParseHTTPVersion(v uint32) string
- func SetK8sNetInfo(n *k8sinfo.K8sNetInfo)
- func SetLogger(nl *logger.Logger)
- func TransPayloadToThrID(id *CPayloadID) uint64
- type CHTTPReqFinished
- type CL7Buffer
- type CLayer7Http
- type CPayloadID
- type ConnectionInfo
- type ConnectionInfoC
- type FlowAgg
- type HTTPFlowTracer
- type HTTPReqFinishedInfo
- type HTTPStats
- type ReqCache
- func (cache *ReqCache) AppendFinReq(id CPayloadID, finReq *HTTPReqFinishedInfo)
- func (cache *ReqCache) AppendPayload(payloadID CPayloadID, info *tracing.TraceInfo)
- func (cache *ReqCache) CleanPathExpr()
- func (cache *ReqCache) MergeReq(etrace bool, procFilter *tracing.ProcessFilter) ([]*HTTPReqFinishedInfo, []*client.Point)
Constants ¶
View Source
const ( NoValue = "N/A" DirectionOutgoing = "outgoing" DirectionIncoming = "incoming" )
View Source
const ( ConnL3Mask uint32 = dknetflow.ConnL3Mask ConnL3IPv4 uint32 = dknetflow.ConnL3IPv4 ConnL3IPv6 uint32 = dknetflow.ConnL3IPv6 ConnL4Mask uint32 = dknetflow.ConnL4Mask ConnL4TCP uint32 = dknetflow.ConnL4TCP ConnL4UDP uint32 = dknetflow.ConnL4UDP PayloadBufSize = 2048 KernelTaskCommLen = 16 )
View Source
const ( HTTP_METHOD_UNKNOWN = 0x00 + iota HTTP_METHOD_GET HTTP_METHOD_POST HTTP_METHOD_PUT HTTP_METHOD_DELETE HTTP_METHOD_HEAD HTTP_METHOD_OPTIONS HTTP_METHOD_PATCH // TODO parse such HTTP data. HTTP_METHOD_CONNECT HTTP_METHOD_TRACE )
View Source
const HTTPPayloadMaxsize = 157
Variables ¶
This section is empty.
Functions ¶
func ConnNotNeedToFilter ¶
func ConnNotNeedToFilter(conn ConnectionInfo) bool
func CreateTracePoint ¶
func FindHTTPURI ¶
func HTTPMethodInt ¶
func HTTPMethodString ¶
func NewHTTPFlowManger ¶
func NewHTTPFlowManger(constEditor []manager.ConstantEditor, bmaps map[string]*ebpf.Map, closedEventHandler, bufHandler perferEventHandle, enableTLS bool) (*manager.Manager, *sysmonitor.UprobeRegister, error)
func ParseHTTPVersion ¶
func SetK8sNetInfo ¶
func SetK8sNetInfo(n *k8sinfo.K8sNetInfo)
func TransPayloadToThrID ¶
func TransPayloadToThrID(id *CPayloadID) uint64
Types ¶
type CHTTPReqFinished ¶
type CHTTPReqFinished C.struct_http_req_finished
type CL7Buffer ¶
type CL7Buffer C.struct_l7_buffer
type CLayer7Http ¶
type CLayer7Http C.struct_layer7_http
type CPayloadID ¶
type CPayloadID C.struct_payload_id
func (CPayloadID) String ¶
func (payloadid CPayloadID) String() string
type ConnectionInfo ¶
type ConnectionInfo dknetflow.ConnectionInfo
func (ConnectionInfo) String ¶
func (conn ConnectionInfo) String() string
type ConnectionInfoC ¶
type ConnectionInfoC dknetflow.ConnectionInfoC
type FlowAgg ¶
type FlowAgg struct {
// contains filtered or unexported fields
}
func (*FlowAgg) Append ¶
func (agg *FlowAgg) Append(httpFinReq *HTTPReqFinishedInfo) error
type HTTPFlowTracer ¶
func NewHTTPFlowTracer ¶
func NewHTTPFlowTracer(tags map[string]string, datakitPostURL, tracePostURL string, conv2dd, enableTrace bool, filter *tracing.ProcessFilter) *HTTPFlowTracer
type HTTPReqFinishedInfo ¶
type HTTPReqFinishedInfo struct { ConnInfo ConnectionInfo HTTPStats HTTPStats }
type ReqCache ¶
type ReqCache struct {
// contains filtered or unexported fields
}
func NewReqCache ¶
func NewReqCache() *ReqCache
func (*ReqCache) AppendFinReq ¶
func (cache *ReqCache) AppendFinReq(id CPayloadID, finReq *HTTPReqFinishedInfo)
func (*ReqCache) AppendPayload ¶
func (cache *ReqCache) AppendPayload(payloadID CPayloadID, info *tracing.TraceInfo)
func (*ReqCache) CleanPathExpr ¶
func (cache *ReqCache) CleanPathExpr()
func (*ReqCache) MergeReq ¶
func (cache *ReqCache) MergeReq(etrace bool, procFilter *tracing.ProcessFilter) ([]*HTTPReqFinishedInfo, []*client.Point)
Click to show internal directories.
Click to hide internal directories.