collector

package
v5.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScheduledJobsCount  = "ScheduledJobsCount"
	RunningJobsCount    = "RunningJobsCount"
	UnfinishedJobsCount = "UnfinishedJobsCount"
	WaitingJobsCount    = "WaitingJobsCount"
	IdleAgentCount      = "IdleAgentCount"
	BusyAgentCount      = "BusyAgentCount"
	TotalAgentCount     = "TotalAgentCount"
	BusyAgentPercentage = "BusyAgentPercentage"

	PollDurationHeader = `Buildkite-Agent-Metrics-Poll-Duration`
)

Variables

View Source
var (
	ErrUnauthorized = errors.New("unauthorized")
)

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Endpoint  string
	Token     string
	UserAgent string
	Queues    []string
	Quiet     bool
	Debug     bool
	DebugHttp bool
	Timeout   int
}

func (*Collector) Collect

func (c *Collector) Collect() (*Result, error)

type Result

type Result struct {
	Totals       map[string]int
	Queues       map[string]map[string]int
	Org          string
	Cluster      string
	PollDuration time.Duration
}

func (Result) Dump

func (r Result) Dump()

Jump to

Keyboard shortcuts

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