monitor

package
v16.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCPUCollector

func NewCPUCollector() metric.Collector

func NewDiskCollector

func NewDiskCollector(path string) metric.Collector

func NewFFmpegCollector

func NewFFmpegCollector(f ffmpeg.FFmpeg) metric.Collector

func NewFilesystemCollector

func NewFilesystemCollector(name string, fs fs.Filesystem) metric.Collector

func NewMemCollector

func NewMemCollector() metric.Collector

func NewNetCollector

func NewNetCollector() metric.Collector

func NewRestreamCollector

func NewRestreamCollector(r restream.Restreamer) metric.Collector

func NewSessionCollector

func NewSessionCollector(r session.RegistryReader, collectors []string) metric.Collector

func NewUptimeCollector

func NewUptimeCollector() metric.Collector

Types

type Config

type Config struct{}

type HistoryConfig

type HistoryConfig struct {
	Config    Config
	Enable    bool
	Timerange time.Duration
	Interval  time.Duration
}

type HistoryMetrics

type HistoryMetrics struct {
	TS      time.Time
	Metrics metric.Metrics
}

type HistoryMonitor

type HistoryMonitor interface {
	HistoryReader
	Register(c metric.Collector)
	UnregisterAll()
}

func NewHistory

func NewHistory(config HistoryConfig) (HistoryMonitor, error)

type HistoryReader

type HistoryReader interface {
	Reader
	History(timerange, interval time.Duration, patterns []metric.Pattern) []HistoryMetrics
	Resolution() (timerange, interval time.Duration)
}

type Monitor

type Monitor interface {
	Reader
	Register(c metric.Collector)
	UnregisterAll()
}

func New

func New(config Config) Monitor

type Reader

type Reader interface {
	Collect(patterns []metric.Pattern) metric.Metrics
	Describe() []*metric.Description
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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