responses

package
v0.0.0-...-f73c5c5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnoughPromResults

func EnoughPromResults(results []Result) error

func TotalPromCount

func TotalPromCount(results []Result) (int, error)

Types

type Data

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

type QueryResult

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

type Result

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

Result structure assumes that resultType is always == "vector"

func ParseQueryOutput

func ParseQueryOutput(body []byte) ([]Result, error)

Jump to

Keyboard shortcuts

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