Documentation ¶
Index ¶
- Constants
- Variables
- func MapToString(tagsMap map[string]string) string
- func StringToMap(tags string) map[string]string
- type FieldReader
- type FieldUID
- type IDGenerator
- type MetadataGetter
- type MetricUID
- type SeriesIDsFilter
- type TagsReader
- type TagsUID
- func (t *TagsUID) Flush() error
- func (t *TagsUID) GetOrCreateTagsID(metricID uint32, tags string) (uint32, error)
- func (t *TagsUID) GetTagNames(metricID uint32, limit int16) map[string]struct{}
- func (t *TagsUID) GetTagValueBitmap(metricID uint32, tagName string, tagValue string) *roaring.Bitmap
- func (t *TagsUID) SuggestTagValues(metricID uint32, tagName string, tagValuePrefix string, limit uint16) map[string]struct{}
Constants ¶
Variables ¶
var ErrNotExist = errors.New("not exist")
Functions ¶
func MapToString ¶
func StringToMap ¶
Types ¶
type FieldReader ¶
type FieldReader struct {
// contains filtered or unexported fields
}
FieldReader represents parses byte arrays for reading
type FieldUID ¶
type FieldUID struct {
// contains filtered or unexported fields
}
FieldUID represents field unique under the metric name.
func (*FieldUID) GetFieldID ¶
GetFieldID returns get fieldID by fieldName within the metric name
type IDGenerator ¶
type IDGenerator interface { // GenMetricID generates ID(uint32) from metricName GenMetricID(metricName string) uint32 // GenFieldID generates ID(uint32) from metricID and fieldName GenFieldID(metricID uint32, fieldName string, fieldType field.Type) (uint16, error) }
IDGenerator generates unique ID numbers for metric, tag and field.
type MetadataGetter ¶
type MetadataGetter interface { // GetMetricID returns metric ID(uint32), if not exist return ErrNotExist error GetMetricID(metricName string) (uint32, error) // GetFieldID returns field id and type by given metricID and field name, // if not exist return ErrNotExist error GetFieldID(metricID uint32, fieldName string) (fieldID uint16, fieldType field.Type, err error) // GetTagValues returns tag values by tag keys and spec version for metric level GetTagValues(metricID uint32, tagKeys []string, version int64) (tagValues []string, err error) }
MetadataGetter represents the query ability for metric level metadata, such as metric id, field meta etc.
type MetricUID ¶
type MetricUID struct {
// contains filtered or unexported fields
}
MetricUid represents metric name unique id under the database
func NewMetricUID ¶
NewMetricUID creation requires kvFamily
func (*MetricUID) GetOrCreateMetricID ¶
GetOrCreateMetricID returns find the metric ID associated with a given name or create it.
type SeriesIDsFilter ¶
type SeriesIDsFilter interface { // FindSeriesIDsByExpr finds series ids by tag filter expr for metric id FindSeriesIDsByExpr(metricID uint32, expr stmt.TagFilter, timeRange timeutil.TimeRange) (*series.MultiVerSeriesIDSet, error) // GetSeriesIDsForTag get series ids for spec metric's tag key GetSeriesIDsForTag(metricID uint32, tagKey string, timeRange timeutil.TimeRange) (*series.MultiVerSeriesIDSet, error) }
SeriesIDsFilter represents the query ability for filtering seriesIDs by expr from an index of tags. to support multi-version based on timestamp, time range for filtering spec version is necessary
type TagsReader ¶
type TagsReader struct {
// contains filtered or unexported fields
}
TagsReader represents parses tags byte arrays for reading
type TagsUID ¶
type TagsUID struct {
// contains filtered or unexported fields
}
TagsUID represents tags unique id under the metric name.
func (*TagsUID) GetOrCreateTagsID ¶
GetOrCreateTagsID returns find the tags ID associated with given tags or create it.
func (*TagsUID) GetTagNames ¶
GetTagNames return get all tag names within the metric name