Documentation ¶
Index ¶
- func NewTCPTracker(conn net.Conn, manager *Manager, metadata Metadata, router adapter.Router, ...) *tcpTracker
- func NewUDPTracker(conn N.PacketConn, manager *Manager, metadata Metadata, router adapter.Router, ...) *udpTracker
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) Join(c tracker)
- func (m *Manager) Leave(c tracker)
- func (m *Manager) Now() (up int64, down int64)
- func (m *Manager) PushDownloaded(size int64)
- func (m *Manager) PushUploaded(size int64)
- func (m *Manager) ResetStatistic()
- func (m *Manager) Snapshot() *Snapshot
- type Metadata
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTCPTracker ¶
func NewUDPTracker ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) PushDownloaded ¶
func (*Manager) PushUploaded ¶
func (*Manager) ResetStatistic ¶
func (m *Manager) ResetStatistic()
type Metadata ¶
type Metadata struct { NetWork string `json:"network"` Type string `json:"type"` SrcIP netip.Addr `json:"sourceIP"` DstIP netip.Addr `json:"destinationIP"` SrcPort string `json:"sourcePort"` DstPort string `json:"destinationPort"` Host string `json:"host"` DNSMode string `json:"dnsMode"` ProcessPath string `json:"processPath"` }
Click to show internal directories.
Click to hide internal directories.