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
Click to show internal directories.
Click to hide internal directories.