Documentation ¶
Index ¶
- Constants
- Variables
- func FormatCID(cid ConnectionID) string
- func IPPort(ip string, port uint16) string
- type ConnUpdate
- type ConnectionID
- type ExportData
- type NodeUpdate
- type Tracker
- func (t *Tracker) GetBytesRecv() uint64
- func (t *Tracker) GetBytesRecvPerSecond() uint64
- func (t *Tracker) GetBytesSent() uint64
- func (t *Tracker) GetBytesSentPerSecond() uint64
- func (t *Tracker) GetConnectionData() map[ConnectionID]ExportData
- func (t *Tracker) GetNumConnections() uint16
- func (t *Tracker) GetTotalBytesRecv() uint64
- func (t *Tracker) GetTotalBytesSent() uint64
- func (t *Tracker) ResetStats() error
- func (t *Tracker) StartTracker()
- func (t *Tracker) Stop()
Constants ¶
View Source
const (
MaxConnBuffer = 256
)
Variables ¶
View Source
var ( DefaultTracker = Tracker{ Tick: 1 * time.Second, Config: &ebpf.Config{ CollectTCPConns: true, CollectUDPConns: true, CollectIPv6Conns: true, CollectLocalDNS: false, DNSInspection: false, UDPConnTimeout: 30 * time.Second, TCPConnTimeout: 2 * time.Minute, MaxTrackedConnections: 65536, ConntrackMaxStateSize: 65536, ProcRoot: "/proc", BPFDebug: false, EnableConntrack: true, MaxClosedConnectionsBuffered: 50000, MaxConnectionsStateBuffered: 75000, ClientStateExpiry: 2 * time.Minute, ClosedChannelSize: 500, }, NodeUpdateChan: make(chan NodeUpdate, MaxConnBuffer), ConnUpdateChan: make(chan ConnUpdate, MaxConnBuffer), // contains filtered or unexported fields } )
Functions ¶
func FormatCID ¶
func FormatCID(cid ConnectionID) string
Types ¶
type ConnUpdate ¶
type ConnUpdate struct { Connection ConnectionID Data ExportData }
Type to be piped through chan to collector for updates
type ConnectionID ¶
type ExportData ¶
type NodeUpdate ¶
type Tracker ¶
type Tracker struct { Tick time.Duration // time idle before considering connection inactive Timeout time.Duration Config *ebpf.Config NodeUpdateChan chan NodeUpdate ConnUpdateChan chan ConnUpdate // contains filtered or unexported fields }
func NewTracker ¶
func NewTracker() *Tracker
func (*Tracker) GetBytesRecv ¶
func (*Tracker) GetBytesRecvPerSecond ¶
func (*Tracker) GetBytesSent ¶
func (*Tracker) GetBytesSentPerSecond ¶
func (*Tracker) GetConnectionData ¶
func (t *Tracker) GetConnectionData() map[ConnectionID]ExportData
func (*Tracker) GetNumConnections ¶
func (*Tracker) GetTotalBytesRecv ¶
func (*Tracker) GetTotalBytesSent ¶
func (*Tracker) ResetStats ¶
Clears the current internal tracking data.
func (*Tracker) StartTracker ¶
func (t *Tracker) StartTracker()
Click to show internal directories.
Click to hide internal directories.