collector

package
v0.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollector

func NewCollector(name string, host string, clientType string, o Options) *Collector

type Options

type Options struct {
	Lang                 string            // 状态语言 可以选择 zh en 其他报错
	MaxUpSpeed           int               // 最大上传带宽
	MaxDownSpeed         int               // 最大下载带宽
	DownloaderExporter   bool              // 是否使用Downloader_exporter兼容模式
	RewriteTracker       map[string]string // tracker重写列表
	UseCategoryAsTracker bool              // 使用分类名称作为tracker
}

Options 可选项

type QbittorrentCollector

type QbittorrentCollector struct {
	Options Options
	// contains filtered or unexported fields
}

func NewQbittorrentCollector

func NewQbittorrentCollector(name string, c *client.QbittorrentClient, o Options) *QbittorrentCollector

func (*QbittorrentCollector) Collect

func (q *QbittorrentCollector) Collect(metrics chan<- prometheus.Metric)

func (*QbittorrentCollector) Describe

func (q *QbittorrentCollector) Describe(descs chan<- *prometheus.Desc)

func (*QbittorrentCollector) RewriteStatusInt

func (q *QbittorrentCollector) RewriteStatusInt(status string) float64

func (*QbittorrentCollector) RewriteStatusStr

func (q *QbittorrentCollector) RewriteStatusStr(status string) string

type TransmissionCollector

type TransmissionCollector struct {
	Options Options
	Coll    *Collector
	// contains filtered or unexported fields
}

func NewTransmissionCollector

func NewTransmissionCollector(name string, c *client.TransmissionClient, o Options) *TransmissionCollector

func (*TransmissionCollector) Collect

func (t *TransmissionCollector) Collect(metrics chan<- prometheus.Metric)

func (*TransmissionCollector) Describe

func (t *TransmissionCollector) Describe(descs chan<- *prometheus.Desc)

func (*TransmissionCollector) RewriteStatusStr

func (t *TransmissionCollector) RewriteStatusStr(status string) string

Jump to

Keyboard shortcuts

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