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: 0

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