exporter

package
v0.0.0-...-731a6bf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter combines the metric collector and descritions.

func NewExporter

func NewExporter(address, username, password string) *Exporter

NewExporter gives you a new exporter instance.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect delivers the metrics to Prometheus.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe defines the metric descriptions for Prometheus.

type Job

type Job struct {
	Name  string `json:"name"`
	Color string `json:"color"`
	URL   string `json:"url"`
	Class string `json:"_class"`
	Jobs  []*Job `json:"jobs"`
}

Job represents a single job definition from the Jenkins API.

func (*Job) Key

func (j *Job) Key() string

Key generates a usable map key for the job.

type Root

type Root struct {
	Jobs []*Job `json:"jobs"`
}

Root represents the root api response from the Jenkins API.

func (*Root) Fetch

func (r *Root) Fetch(address, username, password string) error

Fetch gathers the root content from the Jenkins API.

Jump to

Keyboard shortcuts

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