collector

package
v0.143.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainloopCollector

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

ChainloopCollector is a base implementation of the ChainloopCollector interface

func NewChainloopCollector

func NewChainloopCollector(orgName string, gatherer ChainloopMetricsGatherer, logger log.Logger) *ChainloopCollector

NewChainloopCollector creates a new ChainloopCollector with basic metrics

func (*ChainloopCollector) Collect

func (bcc *ChainloopCollector) Collect(ch chan<- prometheus.Metric)

func (*ChainloopCollector) Describe

func (bcc *ChainloopCollector) Describe(ch chan<- *prometheus.Desc)

type ChainloopMetricsGatherer

type ChainloopMetricsGatherer interface {
	GetLastWorkflowStatusByRun(ctx context.Context, orgName string) ([]*WorkflowLastStatusByRunReport, error)
}

ChainloopMetricsGatherer is an interface for a gatherer that gathers metrics for Chainloop prometheus collector

type WorkflowLastStatusByRunReport

type WorkflowLastStatusByRunReport struct {
	WorkflowName string `json:"workflow_name"`
	OrgName      string `json:"org_name"`
	Status       string `json:"status"`
	Runner       string `json:"runner"`
}

WorkflowLastStatusByRunReport is a report of the status of a workflow by its last run

Jump to

Keyboard shortcuts

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