exporter

package
v0.0.0-...-b0c13aa Latest Latest
Warning

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

Go to latest
Published: Jan 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"`
	Links struct {
		Self struct {
			URL string `json:"href"`
		} `json:"self"`
	} `json:"_links"`
	Fail    int `json:"numberOfFailingBranches"`
	Success int `json:"numberOfSuccessfulBranches"`
	Weather int `json:"weatherScore"`
}

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 []Job

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