collector

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateSwiftInfo

func UpdateSwiftInfo(jsonBytes []byte)

Types

type Collector

type Collector interface {
	// Get new metrics and expose them via prometheus registry.
	Update(ch chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewDiskCollector

func NewDiskCollector() Collector

NewDiskCollector returns a new Collector exposing disk usage.

func NewProxyCollector

func NewProxyCollector() Collector

func NewServerCollector

func NewServerCollector() Collector

NewServerCollector returns a new Collector exposing server stats.

type SwiftCollector

type SwiftCollector struct {
	Collectors map[string]Collector
}

func NewSwiftCollector

func NewSwiftCollector(filters ...string) (*SwiftCollector, error)

func (*SwiftCollector) Collect

func (c *SwiftCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*SwiftCollector) Describe

func (c *SwiftCollector) Describe(ch chan<- *prometheus.Desc)

type SwiftInfo

type SwiftInfo struct {
	Account []struct {
		Host string
		Port string
	}
	Container []struct {
		Host string
		Port string
	}
	Object []struct {
		Host    string
		Port    string
		Devices []string
	}
}

func GetSwiftInfo

func GetSwiftInfo() *SwiftInfo

Jump to

Keyboard shortcuts

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