collector

package
v0.0.0-...-5eef401 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const METADATA_ENDPOINT = "http://169.254.169.254/latest/meta-data/"
View Source
const TOKEN_ENDPOINT = "http://169.254.169.254/latest/api/token"

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	MetadataEndpoint          string
	SpotScrapeSuccessful      *prometheus.Desc
	SpotTerminationIndicator  *prometheus.Desc
	SpotTerminationTime       *prometheus.Desc
	ScheduledScrapeSuccessful *prometheus.Desc
	ScheduledActionIndicator  *prometheus.Desc
	ScheduledActionStartTime  *prometheus.Desc
	ScheduledActionEndTime    *prometheus.Desc
}

func NewCollector

func NewCollector() *Collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type InstanceAction

type InstanceAction struct {
	Action string    `json:"action"`
	Time   time.Time `json:"time"`
}

type ScheduledEvent

type ScheduledEvent struct {
	State       string    `json:"State"`
	Code        string    `json:"Code"`
	Description string    `json:"Description"`
	NotBefore   time.Time `json:"NotBefore"`
	NotAfter    time.Time `json:"NotAfter"`
}

Jump to

Keyboard shortcuts

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