trafficagg

package
v1.3.15 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

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

func New

func New(svcCtx *svc.ServiceContext) *Aggregator

func (*Aggregator) AddReport

func (a *Aggregator) AddReport(ctx context.Context, serverInfo *node.Server, protocol string, logs []UserTraffic) error

func (*Aggregator) AddReportAt

func (a *Aggregator) AddReportAt(ctx context.Context, serverInfo *node.Server, protocol string, logs []UserTraffic, now time.Time) error

func (*Aggregator) FlushDueBuckets

func (a *Aggregator) FlushDueBuckets(ctx context.Context, now time.Time) error

func (*Aggregator) FlushServerReports

func (a *Aggregator) FlushServerReports(ctx context.Context) error

type UserTraffic

type UserTraffic struct {
	SID      int64
	Upload   int64
	Download int64
}

Jump to

Keyboard shortcuts

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