collectors

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ActionsFlagset = pflag.NewFlagSet("actions", pflag.ExitOnError)
)
View Source
var (
	Collectors = make([]string, 0)
)

Functions

This section is empty.

Types

type Collector

type Collector interface {
	// Update collects Prometheus metrics of collector
	Update(ctx context.Context, ch chan<- metrics.Metric) error
}

Collector collects Prometheus metrics

type CollectorFactory

type CollectorFactory func(client *github.Client) (Collector, error)

CollectorFactory is a common function for creating new Collectors

type GithubCollector

type GithubCollector struct {
	Collectors map[string]Collector
	// contains filtered or unexported fields
}

GithubCollector is the main collector which collects Prometheus metrics from other registered collectors

func NewGithubCollector

func NewGithubCollector(client *github.Client, logger *zap.Logger) (*GithubCollector, error)

NewGithubCollector initializes a new *GithubCollector instance

func (*GithubCollector) Collect

func (c *GithubCollector) Collect(ch chan<- metrics.Metric)

Collect implements Prometheus Collector interface

func (*GithubCollector) Describe

func (c *GithubCollector) Describe(ch chan<- *metrics.Desc)

Describe implements Prometheus Collector interface

Jump to

Keyboard shortcuts

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