measure

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopNTagFamily = "__topN__"
)

Variables

View Source
var (
	ErrEmptyRootPath   = errors.New("root path is empty")
	ErrMeasureNotExist = errors.New("measure doesn't exist")
)
View Source
var ErrMalformedElement = errors.New("element is malformed")
View Source
var ErrTagFamilyNotExist = errors.New("tag family doesn't exist")

Functions

func OrderBy added in v0.2.0

func OrderBy(sort modelv1.Sort) streaming.TopNOption

Types

type Measure

type Measure interface {
	io.Closer
	Write(value *measurev1.DataPointValue) error
	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
}

type Query

type Query interface {
	LoadGroup(name string) (resourceSchema.Group, bool)
	Measure(measure *commonv1.Metadata) (Measure, error)
}

type Service

type Service interface {
	run.PreRunner
	run.Config
	run.Service
	Query
}

func NewService

func NewService(_ context.Context, metadata metadata.Repo, repo discovery.ServiceRepo, pipeline queue.Queue) (Service, error)

NewService returns a new service

Jump to

Keyboard shortcuts

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