executor

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package executor defines the specifications accessing underlying data repositories.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDistributedExecutionContext added in v0.5.0

func WithDistributedExecutionContext(ctx context.Context, ec DistributedExecutionContext) context.Context

WithDistributedExecutionContext returns a new context with distributed execution context.

func WithMeasureExecutionContext added in v0.5.0

func WithMeasureExecutionContext(ctx context.Context, ec MeasureExecutionContext) context.Context

WithMeasureExecutionContext returns a new context with measure execution context.

func WithStreamExecutionContext added in v0.5.0

func WithStreamExecutionContext(ctx context.Context, ec StreamExecutionContext) context.Context

WithStreamExecutionContext returns a new context with stream execution context.

Types

type DistributedExecutionContext added in v0.5.0

type DistributedExecutionContext interface {
	bus.Broadcaster
	TimeRange() *modelv1.TimeRange
}

DistributedExecutionContext allows retrieving data through the distributed module.

func FromDistributedExecutionContext added in v0.5.0

func FromDistributedExecutionContext(ctx context.Context) DistributedExecutionContext

FromDistributedExecutionContext returns the distributed execution context from context.Context.

type DistributedExecutionContextKey added in v0.5.0

type DistributedExecutionContextKey struct{}

DistributedExecutionContextKey is the key of distributed execution context in context.Context.

type ExecutionContext

type ExecutionContext interface {
	Shards(entity tsdb.Entity) ([]tsdb.Shard, error)
	Shard(id common.ShardID) (tsdb.Shard, error)
	ParseTagFamily(family string, item tsdb.Item) (*modelv1.TagFamily, error)
}

ExecutionContext allows retrieving data from tsdb.

type MIterator

type MIterator interface {
	Next() bool

	Current() []*measurev1.DataPoint

	Close() error
}

MIterator allows iterating in a measure data set.

type MeasureExecutable

type MeasureExecutable interface {
	Execute(context.Context) (MIterator, error)
}

MeasureExecutable allows querying in the measure schema.

type MeasureExecutionContext

type MeasureExecutionContext interface {
	ExecutionContext
	ParseField(name string, item tsdb.Item) (*measurev1.DataPoint_Field, error)
}

MeasureExecutionContext allows retrieving data through the measure module.

func FromMeasureExecutionContext added in v0.5.0

func FromMeasureExecutionContext(ctx context.Context) MeasureExecutionContext

FromMeasureExecutionContext returns the measure execution context from context.Context.

type MeasureExecutionContextKey added in v0.5.0

type MeasureExecutionContextKey struct{}

MeasureExecutionContextKey is the key of measure execution context in context.Context.

type StreamExecutable

type StreamExecutable interface {
	Execute(context.Context) ([]*streamv1.Element, error)
}

StreamExecutable allows querying in the stream schema.

type StreamExecutionContext

type StreamExecutionContext interface {
	ExecutionContext
	ParseElementID(item tsdb.Item) (string, error)
}

StreamExecutionContext allows retrieving data through the stream module.

func FromStreamExecutionContext added in v0.5.0

func FromStreamExecutionContext(ctx context.Context) StreamExecutionContext

FromStreamExecutionContext returns the stream execution context from context.Context.

type StreamExecutionContextKey added in v0.5.0

type StreamExecutionContextKey struct{}

StreamExecutionContextKey is the key of stream execution context in context.Context.

Jump to

Keyboard shortcuts

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