model

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package model defines the structures and interfaces for query options and results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name   string
	Values []*modelv1.FieldValue
}

Field is a field name and its values.

type MeasureQueryOptions

type MeasureQueryOptions struct {
	Query           index.Query
	TimeRange       *timestamp.TimeRange
	Order           *OrderBy
	Name            string
	Entities        [][]*modelv1.TagValue
	TagProjection   []TagProjection
	FieldProjection []string
	OrderByType     OrderByType
}

MeasureQueryOptions is the options of a measure query.

type MeasureQueryResult

type MeasureQueryResult interface {
	Pull() *MeasureResult
	Release()
}

MeasureQueryResult is the result of a measure query.

type MeasureResult

type MeasureResult struct {
	Error       error
	Timestamps  []int64
	Versions    []int64
	TagFamilies []TagFamily
	Fields      []Field
	SID         common.SeriesID
}

MeasureResult is the result of a query.

type OrderBy

type OrderBy struct {
	Index *databasev1.IndexRule
	Sort  modelv1.Sort
}

OrderBy is the order by rule.

type OrderByType

type OrderByType int

OrderByType is the type of order by.

const (
	// OrderByTypeTime is the order by time.
	OrderByTypeTime OrderByType = iota
	// OrderByTypeIndex is the order by index.
	OrderByTypeIndex
	// OrderByTypeSeries is the order by series.
	OrderByTypeSeries
)

type StreamQueryOptions

type StreamQueryOptions struct {
	Name           string
	TimeRange      *timestamp.TimeRange
	Entities       [][]*modelv1.TagValue
	Filter         index.Filter
	Order          *OrderBy
	TagProjection  []TagProjection
	MaxElementSize int
}

StreamQueryOptions is the options of a stream query.

type StreamQueryResult

type StreamQueryResult interface {
	Pull(context.Context) *StreamResult
	Release()
}

StreamQueryResult is the result of a stream query.

type StreamResult

type StreamResult struct {
	Error       error
	Timestamps  []int64
	ElementIDs  []uint64
	TagFamilies []TagFamily
	SIDs        []common.SeriesID
}

StreamResult is the result of a query.

type Tag

type Tag struct {
	Name   string
	Values []*modelv1.TagValue
}

Tag is a tag name and its values.

type TagFamily

type TagFamily struct {
	Name string
	Tags []Tag
}

TagFamily is a tag family name and its tags.

type TagProjection

type TagProjection struct {
	Family string
	Names  []string
}

TagProjection is the projection of a tag family and its tags.

Jump to

Keyboard shortcuts

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