sample

package
v0.0.0-...-17c607b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidStr = regexp.MustCompile(`^[a-zA-Z0-9_]+$`).MatchString

Functions

This section is empty.

Types

type Field

type Field struct {
	Type          FieldType
	Name          string
	MeasureValue  float64
	LabelValue    string
	LabelSetValue []string
}

type FieldType

type FieldType int
const (
	Measure FieldType = iota
	Label
	LabelSet
)

type RawSample

type RawSample struct {
	Dataset   string                 `json:"dataset"`
	Timestamp int64                  `json:"timestamp"`
	Sample    map[string]interface{} `json:"sample"`
}

type Sample

type Sample struct {
	Dataset   string
	Timestamp int64
	Data      map[string]Field
}

func SampleFromRawSample

func SampleFromRawSample(r *RawSample) (Sample, error)

Jump to

Keyboard shortcuts

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