Documentation ¶
Overview ¶
Package measure implements a time-series-based storage which is consists of a sequence of data points. Each data point contains tags and fields. They arrive in a fixed interval. A data point could be updated by one with the identical entity(series_id) and timestamp.
Index ¶
Constants ¶
View Source
const (
// TopNTagFamily is the identity of a tag family which contains the topN calculated result.
TopNTagFamily = "__topN__"
)
Variables ¶
View Source
var ( // ErrMeasureNotExist denotes a measure doesn't exist in the metadata repo. ErrMeasureNotExist = errors.New("measure doesn't exist") )
View Source
var ( // TopNValueFieldSpec denotes the field specification of the topN calculated result. TopNValueFieldSpec = &databasev1.FieldSpec{ Name: "value", FieldType: databasev1.FieldType_FIELD_TYPE_INT, EncodingMethod: databasev1.EncodingMethod_ENCODING_METHOD_GORILLA, CompressionMethod: databasev1.CompressionMethod_COMPRESSION_METHOD_ZSTD, } )
Functions ¶
This section is empty.
Types ¶
type Measure ¶
type Measure interface { io.Closer Shards(entity tsdb.Entity) ([]tsdb.Shard, error) CompanionShards(metadata *commonv1.Metadata) ([]tsdb.Shard, error) Shard(id common.ShardID) (tsdb.Shard, error) ParseTagFamily(family string, item tsdb.Item) (*modelv1.TagFamily, error) ParseField(name string, item tsdb.Item) (*measurev1.DataPoint_Field, error) GetSchema() *databasev1.Measure GetIndexRules() []*databasev1.IndexRule GetInterval() time.Duration }
Measure allows inspecting measure data points' details.
type Query ¶
type Query interface { LoadGroup(name string) (resourceSchema.Group, bool) Measure(measure *commonv1.Metadata) (Measure, error) }
Query allow to retrieve measure data points.
Click to show internal directories.
Click to hide internal directories.