providers

package
v0.0.0-...-8868a4c Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InternalBucketThreshold = time.Minute * 1
	MaxNumberOfBars         = 30
)

Variables

This section is empty.

Functions

func EntryAdded

func EntryAdded(size int, summery *api.BaseEntry)

func InitProtocolToColor

func InitProtocolToColor(protocolMap map[string]*api.Protocol)

func ResetGeneralStats

func ResetGeneralStats()

Types

type AccumulativeStatsCounter

type AccumulativeStatsCounter struct {
	Name            string `json:"name"`
	Color           string `json:"color"`
	EntriesCount    int    `json:"entriesCount"`
	VolumeSizeBytes int    `json:"volumeSizeBytes"`
}

type AccumulativeStatsProtocol

type AccumulativeStatsProtocol struct {
	AccumulativeStatsCounter
	Methods []*AccumulativeStatsCounter `json:"methods"`
}

type AccumulativeStatsProtocolTime

type AccumulativeStatsProtocolTime struct {
	ProtocolsData []*AccumulativeStatsProtocol `json:"protocols"`
	Time          int64                        `json:"timestamp"`
}

type BucketStats

type BucketStats []*TimeFrameStatsValue

type GeneralStats

type GeneralStats struct {
	EntriesCount        int
	EntriesVolumeInGB   float64
	FirstEntryTimestamp int
	LastEntryTimestamp  int
}

func GetGeneralStats

func GetGeneralStats() *GeneralStats

type ProtocolStats

type ProtocolStats struct {
	MethodsStats map[string]*SizeAndEntriesCount `json:"methods"`
}

type SizeAndEntriesCount

type SizeAndEntriesCount struct {
	EntriesCount  int `json:"entriesCount"`
	VolumeInBytes int `json:"volumeInBytes"`
}

type TimeFrameStatsValue

type TimeFrameStatsValue struct {
	BucketTime    time.Time                `json:"timestamp"`
	ProtocolStats map[string]ProtocolStats `json:"protocols"`
}

type TrafficStatsResponse

type TrafficStatsResponse struct {
	Protocols     []string                         `json:"protocols"`
	PieStats      []*AccumulativeStatsProtocol     `json:"pie"`
	TimelineStats []*AccumulativeStatsProtocolTime `json:"timeline"`
}

func GetTrafficStats

func GetTrafficStats(startTime time.Time, endTime time.Time) *TrafficStatsResponse

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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