input

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Originkey = "message"

Variables

This section is empty.

Functions

func PutMeta

func PutMeta(meta *TFMeta)

func PutPoint

func PutPoint(pt *Point)

Types

type InputWithVarbMapR

type InputWithVarbMapR interface {
	Get(key string) (any, ast.DType, bool)
}

type InputWithVarbMapRW

type InputWithVarbMapRW interface {
	Get(key string) (any, ast.DType, bool)
	Set(key string, value any, dtype ast.DType) bool
	Delete(key string) bool
}

type InputWithoutVarbMap

type InputWithoutVarbMap interface{}

type KeyKind

type KeyKind uint
const (
	KindPtDefault KeyKind = iota
	KindPtTag
)

type Point

type Point struct {
	Measurement string
	Tags        map[string]string
	Fields      map[string]any // int, float, bool, string, map, slice, array
	Time        time.Time

	Drop bool
	Meta map[string]*TFMeta // [DType, PtFlag]
}

func GetPoint

func GetPoint() *Point

func InitPt

func InitPt(pt *Point, m string, t map[string]string, f map[string]any, tn time.Time) *Point

func (*Point) Delete

func (pt *Point) Delete(key string)

func (*Point) Get

func (pt *Point) Get(key string) (any, ast.DType, error)

func (*Point) GetMeasurement

func (pt *Point) GetMeasurement() string

func (*Point) KeyTime2Time

func (pt *Point) KeyTime2Time()

func (*Point) Mv2Tag

func (pt *Point) Mv2Tag(key string) error

func (*Point) Set

func (pt *Point) Set(key string, value any, dtype ast.DType) error

func (*Point) SetMeasurement

func (pt *Point) SetMeasurement(m string)

func (*Point) SetTag

func (pt *Point) SetTag(key string, value any, dtype ast.DType) error

type PtFlag

type PtFlag uint
const (
	PtMeasurement PtFlag = iota
	PtTag
	PtField
	PtTFDefaulutOrKeep
	PtTime
)

type TFMeta

type TFMeta struct {
	DType  ast.DType
	PtFlag PtFlag
}

func GetMeta

func GetMeta(dtype ast.DType, ptflag PtFlag) *TFMeta

Jump to

Keyboard shortcuts

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