types

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

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

Data - all useful data (except status and errors) that's returned by prometheus

type HTTPResponse

type HTTPResponse struct {
	Status    string `json:"status"`
	ErrorType string `json:"errorType"`
	Error     string `json:"error"`
	Data      Data   `json:"data"`
}

HTTPResponse - full HTTP response from prometheus

type PrometheusFindResponse

type PrometheusFindResponse struct {
	Status    string              `json:"status"`
	ErrorType string              `json:"errorType"`
	Error     string              `json:"error"`
	Data      []map[string]string `json:"data"`
}

type PrometheusTagResponse

type PrometheusTagResponse struct {
	Status    string   `json:"status"`
	ErrorType string   `json:"errorType"`
	Error     string   `json:"error"`
	Data      []string `json:"data"`
}

type Result

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

Result contains result as returned by Prometheus

type Tag

type Tag struct {
	TagValue string
	OP       string
}

Tag handles prometheus-specific tags

type Value

type Value struct {
	Timestamp float64
	Value     float64
}

Value contains timestamp/value after parsing

func (*Value) UnmarshalJSON

func (p *Value) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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