collector

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var METRIC_PREFIX = "sabnzbd"

Functions

This section is empty.

Types

type SabnzbdCollector

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

func NewSabnzbdCollector

func NewSabnzbdCollector(config *config.SabnzbdConfig) (*SabnzbdCollector, error)

TODO: Add a sab-specific config struct to abstract away the config parsing

func (*SabnzbdCollector) Collect

func (e *SabnzbdCollector) Collect(ch chan<- prometheus.Metric)

func (*SabnzbdCollector) Describe

func (e *SabnzbdCollector) Describe(ch chan<- *prometheus.Desc)

type ServerStats

type ServerStats interface {
	Update(stat model.ServerStat) (ServerStats, error)
	GetTotal() int
	GetArticlesTried() int
	GetArticlesSuccess() int
}

type ServersStatsCache

type ServersStatsCache struct {
	Total   int
	Servers map[string]serverStatCache
	// contains filtered or unexported fields
}

func NewServersStatsCache

func NewServersStatsCache() *ServersStatsCache

func (*ServersStatsCache) GetServerMap

func (c *ServersStatsCache) GetServerMap() map[string]ServerStats

func (*ServersStatsCache) GetTotal

func (c *ServersStatsCache) GetTotal() int

func (*ServersStatsCache) Update

func (c *ServersStatsCache) Update(stats model.ServerStats) error

Jump to

Keyboard shortcuts

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