collectors

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 11 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 interface {
	// Update collects Prometheus metrics of collector
	Update(ch chan<- metrics.Metric) error
}

Collector collects Prometheus metrics

type CollectorFactory

type CollectorFactory func(client *github.Client, logger *zap.Logger) (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

type GithubCollectorOpts

type GithubCollectorOpts struct {
	Client        *github.Client
	Logger        *zap.Logger
	Organizations []string
	Repositories  []string
}

Jump to

Keyboard shortcuts

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