influxparser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Field_Type_Unknown = 0
	Field_Type_Int     = 1
	Field_Type_UInt    = 2
	Field_Type_Float   = 3
	Field_Type_String  = 4
	Field_Type_Boolean = 5
	Field_Type_Tag     = 6
	Field_Type_Last    = 7
)
View Source
const ByteSplit = 0x00

Variables

View Source
var (
	// ErrPointMustHaveAField is returned when operating on a point that does not have any fields.
	ErrPointMustHaveAField = errno.NewError(errno.WritePointMustHaveAField)
	// ErrInvalidPoint is returned when a point cannot be parsed correctly.
	ErrInvalidPoint = errno.NewError(errno.WriteInvalidPoint)
)

Functions

func FieldTypeString

func FieldTypeString(fieldType int32) string

func GetBytesBuffer

func GetBytesBuffer() []byte

func GetOriginMstName

func GetOriginMstName(nameWithVer string) string

func MeasurementName

func MeasurementName(src []byte) ([]byte, []byte, error)

MeasurementName extract measurement from series key, return measurement_name_with_version, tail, error

func PutBytesBuffer

func PutBytesBuffer(b []byte)

Types

type Field

type Field struct {
	Key      string
	NumValue float64
	StrValue string
	Type     int32
}

Field represents influx field.

func (*Field) Reset

func (f *Field) Reset()

type Fields

type Fields []Field

func (*Fields) Len

func (fs *Fields) Len() int

func (*Fields) Less

func (fs *Fields) Less(i, j int) bool

func (*Fields) Reset

func (fs *Fields) Reset()

func (*Fields) Swap

func (fs *Fields) Swap(i, j int)

type IndexOption

type IndexOption struct {
	IndexList []uint16
	Oids      []uint32
	IndexType uint32
	Oid       uint32
}

IndexOption represents index option.

type IndexOptions

type IndexOptions []IndexOption

type PointTags

type PointTags []Tag

func (*PointTags) HasTagArray

func (pts *PointTags) HasTagArray() bool

func (*PointTags) Len

func (pts *PointTags) Len() int

func (*PointTags) Less

func (pts *PointTags) Less(i, j int) bool

func (*PointTags) Reset

func (pts *PointTags) Reset()

func (*PointTags) Swap

func (pts *PointTags) Swap(i, j int)

func (*PointTags) TagsSize

func (pts *PointTags) TagsSize() int

type Row

type Row struct {
	// if streamOnly is false, it means that the source table data of the stream will also be written,
	// otherwise the source table data of the stream will not be written
	StreamOnly              bool
	Timestamp               int64
	SeriesId                uint64
	PrimaryId               uint64
	Name                    string // measurement name with version
	Tags                    PointTags
	Fields                  Fields
	IndexKey                []byte
	ShardKey                []byte
	StreamId                []uint64 // it used to indicate that the data is shared by multiple streams
	IndexOptions            IndexOptions
	ColumnToIndex           map[string]int // it indicates the sorted tagKey, fieldKey and index mapping relationship
	ReadyBuildColumnToIndex bool
	// contains filtered or unexported fields
}

Row is a single influx row.

func (*Row) Reset

func (r *Row) Reset()

type Tag

type Tag struct {
	Key     string
	Value   string
	IsArray bool
}

Tag PointTag represents influx tag.

func (*Tag) Reset

func (tag *Tag) Reset()

func (*Tag) Size

func (tag *Tag) Size() int

Jump to

Keyboard shortcuts

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