parser

package
v0.15.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datapoint

type Datapoint struct {
	Value     Value     `json:"val"`
	Timestamp time.Time `json:"ts"`
}

Datapoint is a JSON serializeable datapoint for the series.

type Datapoints

type Datapoints []Datapoint

Datapoints is a JSON serializeable list of values for the series.

type Series

type Series struct {
	Start      time.Time  `json:"start"`
	End        time.Time  `json:"end"`
	Tags       Tags       `json:"tags"`
	Datapoints Datapoints `json:"datapoints"`
	// contains filtered or unexported fields
}

Series is a flat JSON serieazeable representation of the series.

func (*Series) IDOrGenID

func (r *Series) IDOrGenID() string

IDOrGenID gets the ID for this result.

type Tags

type Tags map[string]string

Tags is a simple JSON serieazeable representation of tags.

type Value

type Value float64

Value is a JSON serizlizable float64 that allows NaNs.

func (Value) MarshalJSON

func (v Value) MarshalJSON() ([]byte, error)

MarshalJSON returns state as the JSON encoding of a Value.

func (*Value) UnmarshalJSON

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

UnmarshalJSON unmarshals JSON-encoded data into a Value.

Jump to

Keyboard shortcuts

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