pkg

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewPNG

func NewPNG(promAddr string, queryRangePath string, defaultTimeout time.Duration) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MetricValues

type MetricValues struct {
	Metric map[string]string `json:"metric"`
	Values []TimestampValue  `json:"values"`
}

type PrometheusResponse

type PrometheusResponse struct {
	Status string                 `json:"status"`
	Data   PrometheusResponseData `json:"data"`
}

type PrometheusResponseData

type PrometheusResponseData struct {
	ResultType string         `json:"resultType"`
	Result     []MetricValues `json:"result"`
}

type TimestampValue

type TimestampValue struct {
	Timestamp int64
	Value     float64
}

func (*TimestampValue) UnmarshalJSON

func (tv *TimestampValue) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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