merger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeNaively

func MergeNaively(output *[]byte, merges ...*[]byte) error

takes arbitratry amount of prometheus responses in json format merges all of the results into one "success"-ful

Types

type Data

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

type Output

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

type Result

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

type Values

type Values [][]interface{}

func (Values) Len

func (v Values) Len() int

func (Values) Less

func (s Values) Less(i, j int) bool

func (Values) Swap

func (s Values) Swap(i, j int)

Jump to

Keyboard shortcuts

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