metrics

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupOldStreams added in v0.0.2

func CleanupOldStreams(maxAge time.Duration) int

func GetStreamStats

func GetStreamStats() map[string]any

Types

type StreamInfo

type StreamInfo struct {
	ID            string
	Subdomain     string
	StartTime     time.Time
	LastActive    time.Time
	IsActive      bool
	BytesReceived atomic.Int64
	BytesSent     atomic.Int64
}

func GetActiveStreams

func GetActiveStreams() []*StreamInfo

func GetInactiveStreams

func GetInactiveStreams() []*StreamInfo

func NewInfo

func NewInfo(id string) *StreamInfo

func (*StreamInfo) Inactive

func (s *StreamInfo) Inactive()

func (*StreamInfo) SetSubdomain

func (s *StreamInfo) SetSubdomain(subdomain string)

func (*StreamInfo) UpdateIn

func (s *StreamInfo) UpdateIn(in int)

func (*StreamInfo) UpdateOut

func (s *StreamInfo) UpdateOut(out int)

Jump to

Keyboard shortcuts

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