Documentation ¶
Index ¶
- func NewTCPTracker(conn net.Conn, manager *Manager, metadata *C.Metadata, rule constants.IpRule) *tcpTracker
- func NewUDPTracker(conn net.PacketConn, manager *Manager, metadata *C.Metadata, ...) *udpTracker
- type Manager
- func (m *Manager) CloseAllConnections()
- func (m *Manager) Connections() []tracker
- func (m *Manager) GetTotal() *Total
- func (m *Manager) Join(c tracker)
- func (m *Manager) Leave(c tracker)
- func (m *Manager) Now(rule constants.IpRule) (up int64, down int64)
- func (m *Manager) PushDownloaded(size int64, rule constants.IpRule)
- func (m *Manager) PushUploaded(size int64, rule constants.IpRule)
- func (m *Manager) ResetStatistic(rule constants.IpRule)
- type SnapshotStatistic
- type Statistic
- type Total
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
}
var DefaultManager *Manager
func (*Manager) CloseAllConnections ¶
func (m *Manager) CloseAllConnections()
func (*Manager) Connections ¶
func (m *Manager) Connections() []tracker
func (*Manager) PushDownloaded ¶
func (*Manager) ResetStatistic ¶
type SnapshotStatistic ¶
type Total ¶
type Total struct { Proxy SnapshotStatistic `json:"proxy"` Direct SnapshotStatistic `json:"direct"` }
Click to show internal directories.
Click to hide internal directories.