storage

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingReadSource = errors.New("missing ReadSource")
)
View Source
var File_source_proto protoreflect.FileDescriptor

Functions

func HasFieldKeyOrValue

func HasFieldKeyOrValue(expr influxql.Expr) (bool, bool)

func NewContextWithReadOptions

func NewContextWithReadOptions(ctx context.Context, opts *ReadOptions) context.Context

NewContextWithRequestOptions returns a new Context with nodeID added.

func RewriteExprRemoveFieldKeyAndValue

func RewriteExprRemoveFieldKeyAndValue(expr influxql.Expr) influxql.Expr

Types

type MetaClient

type MetaClient interface {
	Database(name string) *meta.DatabaseInfo
	ShardGroupsByTimeRange(database, policy string, min, max time.Time) (a []meta.ShardGroupInfo, err error)
}

type ReadOptions

type ReadOptions struct {
	NodeID uint64
}

ReadOptions are additional options that may be passed with context.Context to configure the behavior of a storage read request.

func ReadOptionsFromContext

func ReadOptionsFromContext(ctx context.Context) *ReadOptions

ReadOptionsFromContext returns the ReadOptions associated with the context or nil if no additional options have been specified.

type ReadSource

type ReadSource struct {

	// OrgID specifies the organization identifier for this request.
	OrgID uint64 `protobuf:"varint,1,opt,name=OrgID,proto3" json:"OrgID,omitempty"`
	// BucketID specifies the bucket in the organization.
	BucketID uint64 `protobuf:"varint,2,opt,name=BucketID,proto3" json:"BucketID,omitempty"`
	// contains filtered or unexported fields
}

func GetReadSource

func GetReadSource(any *anypb.Any) (*ReadSource, error)

func (*ReadSource) Descriptor deprecated

func (*ReadSource) Descriptor() ([]byte, []int)

Deprecated: Use ReadSource.ProtoReflect.Descriptor instead.

func (*ReadSource) GetBucketID added in v2.0.9

func (x *ReadSource) GetBucketID() uint64

func (*ReadSource) GetOrgID added in v2.0.9

func (x *ReadSource) GetOrgID() uint64

func (*ReadSource) ProtoMessage

func (*ReadSource) ProtoMessage()

func (*ReadSource) ProtoReflect added in v2.2.0

func (x *ReadSource) ProtoReflect() protoreflect.Message

func (*ReadSource) Reset

func (x *ReadSource) Reset()

func (*ReadSource) String

func (x *ReadSource) String() string

type Store

type Store struct {
	TSDBStore  TSDBStore
	MetaClient MetaClient
	Logger     *zap.Logger
}

func NewStore

func NewStore(store TSDBStore, metaClient MetaClient) *Store

func (*Store) GetSource

func (s *Store) GetSource(orgID, bucketID uint64) proto.Message

func (*Store) MeasurementNames

func (s *Store) MeasurementNames(ctx context.Context, mqAttrs *metaqueryAttributes) (cursors.StringIterator, error)

func (*Store) ReadFilter

func (s *Store) ReadFilter(ctx context.Context, req *datatypes.ReadFilterRequest) (reads.ResultSet, error)

func (*Store) ReadGroup

func (*Store) ReadSeriesCardinality added in v2.0.9

func (s *Store) ReadSeriesCardinality(ctx context.Context, req *datatypes.ReadSeriesCardinalityRequest) (cursors.Int64Iterator, error)

func (*Store) SupportReadSeriesCardinality added in v2.0.9

func (s *Store) SupportReadSeriesCardinality(ctx context.Context) bool

func (*Store) TagKeys

func (*Store) TagValues

func (*Store) WindowAggregate

func (s *Store) WindowAggregate(ctx context.Context, req *datatypes.ReadWindowAggregateRequest) (reads.ResultSet, error)

func (*Store) WithLogger

func (s *Store) WithLogger(log *zap.Logger)

WithLogger sets the logger for the service.

type TSDBStore

type TSDBStore interface {
	MeasurementNames(ctx context.Context, auth query.Authorizer, database string, cond influxql.Expr) ([][]byte, error)
	ShardGroup(ids []uint64) tsdb.ShardGroup
	Shards(ids []uint64) []*tsdb.Shard
	TagKeys(ctx context.Context, auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagKeys, error)
	TagValues(ctx context.Context, auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagValues, error)
	SeriesCardinality(ctx context.Context, database string) (int64, error)
	SeriesCardinalityFromShards(ctx context.Context, shards []*tsdb.Shard) (*tsdb.SeriesIDSet, error)
	SeriesFile(database string) *tsdb.SeriesFile
}

Jump to

Keyboard shortcuts

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