stats

package
v1.28.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TrafficStats

type TrafficStats struct {
	UploadBytes    int64
	DownloadBytes  int64
	Connections    int64
	Requests       int64
	StartTime      int64
	EndTime        *int64
	LastUpdateTime int64
}

TrafficStats represents traffic statistics

type TrafficStatsContainer

type TrafficStatsContainer interface {
	AddUploadBytes(clientId string, bytes int64)
	AddDownloadBytes(clientId string, bytes int64)
	AddConnection(clientId string)
	AddRequest(clientId string)
	GetStats(clientId string) interface{}
	Reset(clientId string)
	SetStartTime(clientId string)
	SetEndTime(clientId string)
	FormatStats(clientId string) string
}

TrafficStatsContainer interface for traffic statistics operations

func NewTrafficStatsContainer

func NewTrafficStatsContainer() TrafficStatsContainer

NewTrafficStatsContainer creates a new traffic statistics container

type TrafficStatsData

type TrafficStatsData struct {
	Global     *TrafficStats
	ByClientId map[string]*TrafficStats
}

TrafficStatsData contains traffic statistics data

Jump to

Keyboard shortcuts

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