monitor

package
v0.0.0-...-31c1c1e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 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.Registry, 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 {
	Monitor
	History(timerange, interval time.Duration, patterns []metric.Pattern) []HistoryMetrics
	Resolution() (timerange, interval time.Duration)
}

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 {
	Register(c metric.Collector)
	Collect(patterns []metric.Pattern) metric.Metrics
	UnregisterAll()
}

func New

func New(config Config) Monitor

type Reader

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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