network

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEventNotify

func AddEventNotify(notify EventNotify)

func AddWatchProcess

func AddWatchProcess(pid int32, from string) error

AddWatchProcess add the process to monitoring with from source BPF would be start automatically

func ForceShutdownBPF

func ForceShutdownBPF() error

func RemoveWatchProcess

func RemoveWatchProcess(pid int32, from string) error

RemoveWatchProcess remove the process to monitoring with from source if no process is monitoring, the BPF would be stopped

Types

type BufferDirection

type BufferDirection uint8
var (
	BufferDirectionRequest  BufferDirection = 1
	BufferDirectionResponse                 = 2
)

type BufferEvent

type BufferEvent interface {
	Pid() int32
	RequestURI() string
	IsResponseError() bool
	Duration() time.Duration
	StartTime() time.Time
}

type EventNotify

type EventNotify interface {
	ReceiveBufferEvent(event BufferEvent)
}

type HTTP1Analyzer

type HTTP1Analyzer struct {
	// contains filtered or unexported fields
}

func NewHTTP1Analyzer

func NewHTTP1Analyzer() *HTTP1Analyzer

func (*HTTP1Analyzer) HandleBufferEvent

func (h *HTTP1Analyzer) HandleBufferEvent(buffer *networkBufferInBPF) BufferEvent

type HTTP1BufferEvent

type HTTP1BufferEvent struct {
	// contains filtered or unexported fields
}

func (*HTTP1BufferEvent) Duration

func (h *HTTP1BufferEvent) Duration() time.Duration

func (*HTTP1BufferEvent) IsResponseError

func (h *HTTP1BufferEvent) IsResponseError() bool

func (*HTTP1BufferEvent) Pid

func (h *HTTP1BufferEvent) Pid() int32

func (*HTTP1BufferEvent) RequestURI

func (h *HTTP1BufferEvent) RequestURI() string

func (*HTTP1BufferEvent) StartTime

func (h *HTTP1BufferEvent) StartTime() time.Time

type ProtocolAnalyzer

type ProtocolAnalyzer interface {
	HandleBufferEvent(buffer *networkBufferInBPF) BufferEvent
}

Jump to

Keyboard shortcuts

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