collector

package
v2.0.0-...-3e9d2e5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitHubBillingCollector

func NewGitHubBillingCollector(config CollectorConfig) (prometheus.Collector, error)

Types

type Collector

type Collector interface {
	Describe(ch chan<- *prometheus.Desc)
	// Reload configuration, repositories, workflows, etc.
	Reload(context.Context) error
	// Get new metrics and expose them via prometheus registry.
	Update(context.Context, chan<- prometheus.Metric) error
}

Collector is the interface a collector has to implement.

func NewOrgActionsCollector

func NewOrgActionsCollector(config CollectorConfig, ctx context.Context) (Collector, error)

NewOrgActionsCollector returns a new Collector exposing actions billing stats.

func NewOrgPackagesCollectorCollector

func NewOrgPackagesCollectorCollector(config CollectorConfig, ctx context.Context) (Collector, error)

NewOrgActionsCollector returns a new Collector exposing actions billing stats.

func NewOrgStorageCollector

func NewOrgStorageCollector(config CollectorConfig, ctx context.Context) (Collector, error)

NewOrgActionsCollector returns a new Collector exposing actions billing stats.

func NewWorkflowActionsCollector

func NewWorkflowActionsCollector(config CollectorConfig, ctx context.Context) (Collector, error)

NewRepoActionsCollector returns a new Collector exposing actions billing stats.

type CollectorConfig

type CollectorConfig struct {
	Logger             log.Logger
	Github             *github.Client
	Orgs               []string
	DisabledCollectors []string
}

type GitHubBillingCollector

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

func (GitHubBillingCollector) Collect

func (ghb GitHubBillingCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (GitHubBillingCollector) Describe

func (ghb GitHubBillingCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type OrgActionsCollector

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

func (*OrgActionsCollector) Describe

func (oac *OrgActionsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector.

func (*OrgActionsCollector) Reload

func (oac *OrgActionsCollector) Reload(ctx context.Context) error

func (*OrgActionsCollector) Update

func (oac *OrgActionsCollector) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type OrgPackagesCollector

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

func (*OrgPackagesCollector) Describe

func (oac *OrgPackagesCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector.

func (*OrgPackagesCollector) Reload

func (oac *OrgPackagesCollector) Reload(ctx context.Context) error

func (*OrgPackagesCollector) Update

func (oac *OrgPackagesCollector) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type OrgStorageCollector

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

func (*OrgStorageCollector) Describe

func (oac *OrgStorageCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector.

func (*OrgStorageCollector) Reload

func (oac *OrgStorageCollector) Reload(ctx context.Context) error

func (*OrgStorageCollector) Update

func (oac *OrgStorageCollector) Update(ctx context.Context, ch chan<- prometheus.Metric) error

type WorkflowActionsCollector

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

func (*WorkflowActionsCollector) Describe

func (wac *WorkflowActionsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Collector.

func (*WorkflowActionsCollector) Reload

func (wac *WorkflowActionsCollector) Reload(ctx context.Context) error

func (*WorkflowActionsCollector) Update

func (wac *WorkflowActionsCollector) Update(ctx context.Context, ch chan<- prometheus.Metric) error

Jump to

Keyboard shortcuts

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