storage

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package storage is a generated protocol buffer package.

It is generated from these files:
	storage.proto
	predicate.proto

It has these top-level messages:
	ReadRequest
	Aggregate
	Tag
	ReadResponse
	CapabilitiesResponse
	HintsResponse
	TimestampRange
	Node
	Predicate

Package storage is a generated protocol buffer package.

It is generated from these files:

storage.proto
predicate.proto

It has these top-level messages:

ReadRequest
Aggregate
Tag
ReadResponse
CapabilitiesResponse
HintsResponse
TimestampRange
Node
Predicate

Index

Constants

View Source
const (
	// DefaultBindAddress is the default address to bind to.
	DefaultBindAddress = ":8082"
)

Variables

View Source
var (
	ErrInvalidLengthPredicate = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPredicate   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthStorage = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStorage   = fmt.Errorf("proto: integer overflow")
)
View Source
var Aggregate_AggregateType_name = map[int32]string{
	0: "NONE",
	1: "SUM",
	2: "COUNT",
}
View Source
var Aggregate_AggregateType_value = map[string]int32{
	"NONE":  0,
	"SUM":   1,
	"COUNT": 2,
}
View Source
var BooleanEmptyBatchCursor tsdb.BooleanBatchCursor = &booleanEmptyBatchCursor{}
View Source
var FloatEmptyBatchCursor tsdb.FloatBatchCursor = &floatEmptyBatchCursor{}
View Source
var IntegerEmptyBatchCursor tsdb.IntegerBatchCursor = &integerEmptyBatchCursor{}
View Source
var Node_Comparison_name = map[int32]string{
	0: "EQUAL",
	1: "NOT_EQUAL",
	2: "STARTS_WITH",
	3: "REGEX",
	4: "NOT_REGEX",
	5: "LT",
	6: "LTE",
	7: "GT",
	8: "GTE",
}
View Source
var Node_Comparison_value = map[string]int32{
	"EQUAL":       0,
	"NOT_EQUAL":   1,
	"STARTS_WITH": 2,
	"REGEX":       3,
	"NOT_REGEX":   4,
	"LT":          5,
	"LTE":         6,
	"GT":          7,
	"GTE":         8,
}
View Source
var Node_Logical_name = map[int32]string{
	0: "AND",
	1: "OR",
}
View Source
var Node_Logical_value = map[string]int32{
	"AND": 0,
	"OR":  1,
}
View Source
var Node_Type_name = map[int32]string{
	0: "LOGICAL_EXPRESSION",
	1: "COMPARISON_EXPRESSION",
	2: "PAREN_EXPRESSION",
	3: "TAG_REF",
	4: "LITERAL",
	5: "FIELD_REF",
}
View Source
var Node_Type_value = map[string]int32{
	"LOGICAL_EXPRESSION":    0,
	"COMPARISON_EXPRESSION": 1,
	"PAREN_EXPRESSION":      2,
	"TAG_REF":               3,
	"LITERAL":               4,
	"FIELD_REF":             5,
}
View Source
var ReadRequest_Group_name = map[int32]string{
	0: "GROUP_NONE",
	1: "GROUP_ALL",
	2: "GROUP_BY",
	3: "GROUP_EXCEPT",
}
View Source
var ReadRequest_Group_value = map[string]int32{
	"GROUP_NONE":   0,
	"GROUP_ALL":    1,
	"GROUP_BY":     2,
	"GROUP_EXCEPT": 3,
}
View Source
var ReadRequest_HintFlags_name = map[int32]string{
	0: "HINT_NONE",
	1: "HINT_NO_POINTS",
	2: "HINT_NO_SERIES",
	4: "HINT_SCHEMA_ALL_TIME",
}
View Source
var ReadRequest_HintFlags_value = map[string]int32{
	"HINT_NONE":            0,
	"HINT_NO_POINTS":       1,
	"HINT_NO_SERIES":       2,
	"HINT_SCHEMA_ALL_TIME": 4,
}
View Source
var ReadResponse_DataType_name = map[int32]string{
	0: "FLOAT",
	1: "INTEGER",
	2: "UNSIGNED",
	3: "BOOLEAN",
	4: "STRING",
}
View Source
var ReadResponse_DataType_value = map[string]int32{
	"FLOAT":    0,
	"INTEGER":  1,
	"UNSIGNED": 2,
	"BOOLEAN":  3,
	"STRING":   4,
}
View Source
var ReadResponse_FrameType_name = map[int32]string{
	0: "SERIES",
	1: "POINTS",
}
View Source
var ReadResponse_FrameType_value = map[string]int32{
	"SERIES": 0,
	"POINTS": 1,
}
View Source
var StringEmptyBatchCursor tsdb.StringBatchCursor = &stringEmptyBatchCursor{}
View Source
var UnsignedEmptyBatchCursor tsdb.UnsignedBatchCursor = &unsignedEmptyBatchCursor{}

Functions

func HasFieldKeyOrValue

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

func HasSingleMeasurementNoOR added in v1.6.1

func HasSingleMeasurementNoOR(expr influxql.Expr) (string, bool)

HasSingleMeasurementNoOR determines if an index optimisation is available.

Typically the read service will use the query engine to retrieve all field keys for all measurements that match the expression, which can be very inefficient if it can be proved that only one measurement matches the expression.

This condition is determined when the following is true:

  • there is only one occurrence of the tag key `_measurement`.
  • there are no OR operators in the expression tree.
  • the operator for the `_measurement` binary expression is ==.

func NodeToExpr

func NodeToExpr(node *Node, remap map[string]string) (influxql.Expr, error)

NodeToExpr transforms a predicate node to an influxql.Expr.

func PredicateToExprString

func PredicateToExprString(p *Predicate) string

func RegisterStorageServer

func RegisterStorageServer(s *yarpc.Server, srv StorageServer)

func RewriteExprRemoveFieldKeyAndValue

func RewriteExprRemoveFieldKeyAndValue(expr influxql.Expr) influxql.Expr

func RewriteExprRemoveFieldValue

func RewriteExprRemoveFieldValue(expr influxql.Expr) influxql.Expr

func WalkNode

func WalkNode(v NodeVisitor, node *Node)

Types

type Aggregate

type Aggregate struct {
	Type Aggregate_AggregateType `` /* 139-byte string literal not displayed */
}

func (*Aggregate) Descriptor

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

func (*Aggregate) Marshal

func (m *Aggregate) Marshal() (dAtA []byte, err error)

func (*Aggregate) MarshalTo

func (m *Aggregate) MarshalTo(dAtA []byte) (int, error)

func (*Aggregate) ProtoMessage

func (*Aggregate) ProtoMessage()

func (*Aggregate) Reset

func (m *Aggregate) Reset()

func (*Aggregate) Size

func (m *Aggregate) Size() (n int)

func (*Aggregate) String

func (m *Aggregate) String() string

func (*Aggregate) Unmarshal

func (m *Aggregate) Unmarshal(dAtA []byte) error

type Aggregate_AggregateType

type Aggregate_AggregateType int32
const (
	AggregateTypeNone  Aggregate_AggregateType = 0
	AggregateTypeSum   Aggregate_AggregateType = 1
	AggregateTypeCount Aggregate_AggregateType = 2
)

func (Aggregate_AggregateType) EnumDescriptor

func (Aggregate_AggregateType) EnumDescriptor() ([]byte, []int)

func (Aggregate_AggregateType) String

func (x Aggregate_AggregateType) String() string

type CapabilitiesResponse

type CapabilitiesResponse struct {
	Caps map[string]string `` /* 142-byte string literal not displayed */
}

func (*CapabilitiesResponse) Descriptor

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

func (*CapabilitiesResponse) Marshal

func (m *CapabilitiesResponse) Marshal() (dAtA []byte, err error)

func (*CapabilitiesResponse) MarshalTo

func (m *CapabilitiesResponse) MarshalTo(dAtA []byte) (int, error)

func (*CapabilitiesResponse) ProtoMessage

func (*CapabilitiesResponse) ProtoMessage()

func (*CapabilitiesResponse) Reset

func (m *CapabilitiesResponse) Reset()

func (*CapabilitiesResponse) Size

func (m *CapabilitiesResponse) Size() (n int)

func (*CapabilitiesResponse) String

func (m *CapabilitiesResponse) String() string

func (*CapabilitiesResponse) Unmarshal

func (m *CapabilitiesResponse) Unmarshal(dAtA []byte) error

type Config

type Config struct {
	Enabled     bool   `toml:"enabled"`
	LogEnabled  bool   `toml:"log-enabled"` // verbose logging
	BindAddress string `toml:"bind-address"`
}

Config represents a configuration for a HTTP service.

func NewConfig

func NewConfig() Config

NewConfig returns a new Config with default settings.

func (Config) Diagnostics

func (c Config) Diagnostics() (*diagnostics.Diagnostics, error)

Diagnostics returns a diagnostics representation of a subset of the Config.

type GroupCursor added in v1.6.0

type GroupCursor interface {
	Tags() models.Tags
	Keys() [][]byte
	PartitionKeyVals() [][]byte
	Next() bool
	Cursor() tsdb.Cursor
	Close()
}

type HintFlags added in v1.6.0

type HintFlags uint32

func (HintFlags) HintSchemaAllTime added in v1.6.0

func (h HintFlags) HintSchemaAllTime() bool

func (HintFlags) NoPoints added in v1.6.0

func (h HintFlags) NoPoints() bool

func (HintFlags) NoSeries added in v1.6.0

func (h HintFlags) NoSeries() bool

func (*HintFlags) SetHintSchemaAllTime added in v1.6.0

func (h *HintFlags) SetHintSchemaAllTime()

func (*HintFlags) SetNoPoints added in v1.6.0

func (h *HintFlags) SetNoPoints()

func (*HintFlags) SetNoSeries added in v1.6.0

func (h *HintFlags) SetNoSeries()

func (HintFlags) String added in v1.6.0

func (h HintFlags) String() string

type HintsResponse

type HintsResponse struct {
}

func (*HintsResponse) Descriptor

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

func (*HintsResponse) Marshal

func (m *HintsResponse) Marshal() (dAtA []byte, err error)

func (*HintsResponse) MarshalTo

func (m *HintsResponse) MarshalTo(dAtA []byte) (int, error)

func (*HintsResponse) ProtoMessage

func (*HintsResponse) ProtoMessage()

func (*HintsResponse) Reset

func (m *HintsResponse) Reset()

func (*HintsResponse) Size

func (m *HintsResponse) Size() (n int)

func (*HintsResponse) String

func (m *HintsResponse) String() string

func (*HintsResponse) Unmarshal

func (m *HintsResponse) Unmarshal(dAtA []byte) error

type Node

type Node struct {
	NodeType Node_Type `` /* 138-byte string literal not displayed */
	Children []*Node   `protobuf:"bytes,2,rep,name=children" json:"children,omitempty"`
	// Types that are valid to be assigned to Value:
	//	*Node_StringValue
	//	*Node_BooleanValue
	//	*Node_IntegerValue
	//	*Node_UnsignedValue
	//	*Node_FloatValue
	//	*Node_RegexValue
	//	*Node_TagRefValue
	//	*Node_FieldRefValue
	//	*Node_Logical_
	//	*Node_Comparison_
	Value isNode_Value `protobuf_oneof:"value"`
}

func (*Node) Descriptor

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

func (*Node) GetBooleanValue

func (m *Node) GetBooleanValue() bool

func (*Node) GetChildren

func (m *Node) GetChildren() []*Node

func (*Node) GetComparison

func (m *Node) GetComparison() Node_Comparison

func (*Node) GetFieldRefValue

func (m *Node) GetFieldRefValue() string

func (*Node) GetFloatValue

func (m *Node) GetFloatValue() float64

func (*Node) GetIntegerValue

func (m *Node) GetIntegerValue() int64

func (*Node) GetLogical

func (m *Node) GetLogical() Node_Logical

func (*Node) GetNodeType

func (m *Node) GetNodeType() Node_Type

func (*Node) GetRegexValue

func (m *Node) GetRegexValue() string

func (*Node) GetStringValue

func (m *Node) GetStringValue() string

func (*Node) GetTagRefValue

func (m *Node) GetTagRefValue() string

func (*Node) GetUnsignedValue

func (m *Node) GetUnsignedValue() uint64

func (*Node) GetValue

func (m *Node) GetValue() isNode_Value

func (*Node) Marshal

func (m *Node) Marshal() (dAtA []byte, err error)

func (*Node) MarshalTo

func (m *Node) MarshalTo(dAtA []byte) (int, error)

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

func (m *Node) Size() (n int)

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

func (m *Node) Unmarshal(dAtA []byte) error

func (*Node) XXX_OneofFuncs

func (*Node) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type NodeVisitor

type NodeVisitor interface {
	Visit(*Node) NodeVisitor
}

NodeVisitor can be called by Walk to traverse the Node hierarchy. The Visit() function is called once per node.

type Node_BooleanValue

type Node_BooleanValue struct {
	BooleanValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

func (*Node_BooleanValue) MarshalTo

func (m *Node_BooleanValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_BooleanValue) Size

func (m *Node_BooleanValue) Size() (n int)

type Node_Comparison

type Node_Comparison int32
const (
	ComparisonEqual        Node_Comparison = 0
	ComparisonNotEqual     Node_Comparison = 1
	ComparisonStartsWith   Node_Comparison = 2
	ComparisonRegex        Node_Comparison = 3
	ComparisonNotRegex     Node_Comparison = 4
	ComparisonLess         Node_Comparison = 5
	ComparisonLessEqual    Node_Comparison = 6
	ComparisonGreater      Node_Comparison = 7
	ComparisonGreaterEqual Node_Comparison = 8
)

func (Node_Comparison) EnumDescriptor

func (Node_Comparison) EnumDescriptor() ([]byte, []int)

func (Node_Comparison) String

func (x Node_Comparison) String() string

type Node_Comparison_

type Node_Comparison_ struct {
	Comparison Node_Comparison `protobuf:"varint,12,opt,name=comparison,proto3,enum=com.github.influxdata.influxdb.services.storage.Node_Comparison,oneof"`
}

func (*Node_Comparison_) MarshalTo

func (m *Node_Comparison_) MarshalTo(dAtA []byte) (int, error)

func (*Node_Comparison_) Size

func (m *Node_Comparison_) Size() (n int)

type Node_FieldRefValue

type Node_FieldRefValue struct {
	FieldRefValue string `protobuf:"bytes,10,opt,name=field_ref_value,json=fieldRefValue,proto3,oneof"`
}

func (*Node_FieldRefValue) MarshalTo

func (m *Node_FieldRefValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_FieldRefValue) Size

func (m *Node_FieldRefValue) Size() (n int)

type Node_FloatValue

type Node_FloatValue struct {
	FloatValue float64 `protobuf:"fixed64,7,opt,name=float_value,json=floatValue,proto3,oneof"`
}

func (*Node_FloatValue) MarshalTo

func (m *Node_FloatValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_FloatValue) Size

func (m *Node_FloatValue) Size() (n int)

type Node_IntegerValue

type Node_IntegerValue struct {
	IntegerValue int64 `protobuf:"varint,5,opt,name=int_value,json=intValue,proto3,oneof"`
}

func (*Node_IntegerValue) MarshalTo

func (m *Node_IntegerValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_IntegerValue) Size

func (m *Node_IntegerValue) Size() (n int)

type Node_Logical

type Node_Logical int32

Logical operators apply to boolean values and combine to produce a single boolean result.

const (
	LogicalAnd Node_Logical = 0
	LogicalOr  Node_Logical = 1
)

func (Node_Logical) EnumDescriptor

func (Node_Logical) EnumDescriptor() ([]byte, []int)

func (Node_Logical) String

func (x Node_Logical) String() string

type Node_Logical_

type Node_Logical_ struct {
	Logical Node_Logical `protobuf:"varint,11,opt,name=logical,proto3,enum=com.github.influxdata.influxdb.services.storage.Node_Logical,oneof"`
}

func (*Node_Logical_) MarshalTo

func (m *Node_Logical_) MarshalTo(dAtA []byte) (int, error)

func (*Node_Logical_) Size

func (m *Node_Logical_) Size() (n int)

type Node_RegexValue

type Node_RegexValue struct {
	RegexValue string `protobuf:"bytes,8,opt,name=regex_value,json=regexValue,proto3,oneof"`
}

func (*Node_RegexValue) MarshalTo

func (m *Node_RegexValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_RegexValue) Size

func (m *Node_RegexValue) Size() (n int)

type Node_StringValue

type Node_StringValue struct {
	StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"`
}

func (*Node_StringValue) MarshalTo

func (m *Node_StringValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_StringValue) Size

func (m *Node_StringValue) Size() (n int)

type Node_TagRefValue

type Node_TagRefValue struct {
	TagRefValue string `protobuf:"bytes,9,opt,name=tag_ref_value,json=tagRefValue,proto3,oneof"`
}

func (*Node_TagRefValue) MarshalTo

func (m *Node_TagRefValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_TagRefValue) Size

func (m *Node_TagRefValue) Size() (n int)

type Node_Type

type Node_Type int32
const (
	NodeTypeLogicalExpression    Node_Type = 0
	NodeTypeComparisonExpression Node_Type = 1
	NodeTypeParenExpression      Node_Type = 2
	NodeTypeTagRef               Node_Type = 3
	NodeTypeLiteral              Node_Type = 4
	NodeTypeFieldRef             Node_Type = 5
)

func (Node_Type) EnumDescriptor

func (Node_Type) EnumDescriptor() ([]byte, []int)

func (Node_Type) String

func (x Node_Type) String() string

type Node_UnsignedValue

type Node_UnsignedValue struct {
	UnsignedValue uint64 `protobuf:"varint,6,opt,name=uint_value,json=uintValue,proto3,oneof"`
}

func (*Node_UnsignedValue) MarshalTo

func (m *Node_UnsignedValue) MarshalTo(dAtA []byte) (int, error)

func (*Node_UnsignedValue) Size

func (m *Node_UnsignedValue) Size() (n int)

type Predicate

type Predicate struct {
	Root *Node `protobuf:"bytes,1,opt,name=root" json:"root,omitempty"`
}

func (*Predicate) Descriptor

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

func (*Predicate) GetRoot

func (m *Predicate) GetRoot() *Node

func (*Predicate) Marshal

func (m *Predicate) Marshal() (dAtA []byte, err error)

func (*Predicate) MarshalTo

func (m *Predicate) MarshalTo(dAtA []byte) (int, error)

func (*Predicate) ProtoMessage

func (*Predicate) ProtoMessage()

func (*Predicate) Reset

func (m *Predicate) Reset()

func (*Predicate) Size

func (m *Predicate) Size() (n int)

func (*Predicate) String

func (m *Predicate) String() string

func (*Predicate) Unmarshal

func (m *Predicate) Unmarshal(dAtA []byte) error

type ReadRequest

type ReadRequest struct {
	// Database specifies the database name (single tenant) or bucket identifier (multi tenant).
	Database       string         `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"`
	TimestampRange TimestampRange `protobuf:"bytes,2,opt,name=timestamp_range,json=timestampRange" json:"timestamp_range"`
	// Descending indicates whether points should be returned in descending order.
	Descending bool `protobuf:"varint,3,opt,name=descending,proto3" json:"descending,omitempty"`
	// GroupKeys specifies a list of tag keys used to order the data. It is dependent on the Group property to determine
	// its behavior.
	GroupKeys []string `protobuf:"bytes,4,rep,name=group_keys,json=groupKeys" json:"group_keys,omitempty"`
	//
	Group ReadRequest_Group `` /* 136-byte string literal not displayed */
	// Aggregate specifies an optional aggregate to apply to the data.
	// TODO(sgc): switch to slice for multiple aggregates in a single request
	Aggregate *Aggregate `protobuf:"bytes,9,opt,name=aggregate" json:"aggregate,omitempty"`
	Predicate *Predicate `protobuf:"bytes,5,opt,name=predicate" json:"predicate,omitempty"`
	// SeriesLimit determines the maximum number of series to be returned for the request. Specify 0 for no limit.
	SeriesLimit int64 `protobuf:"varint,6,opt,name=series_limit,json=seriesLimit,proto3" json:"series_limit,omitempty"`
	// SeriesOffset determines how many series to skip before processing the request.
	SeriesOffset int64 `protobuf:"varint,7,opt,name=series_offset,json=seriesOffset,proto3" json:"series_offset,omitempty"`
	// PointsLimit determines the maximum number of values per series to be returned for the request.
	// Specify 0 for no limit. -1 to return series frames only.
	PointsLimit int64 `protobuf:"varint,8,opt,name=points_limit,json=pointsLimit,proto3" json:"points_limit,omitempty"`
	// Trace contains opaque data if a trace is active.
	Trace map[string]string `` /* 145-byte string literal not displayed */
	// Hints is a bitwise OR of HintFlags to control the behavior
	// of the read request.
	Hints HintFlags `protobuf:"fixed32,12,opt,name=hints,proto3,casttype=HintFlags" json:"hints,omitempty"`
}

Request message for Storage.Read.

func (*ReadRequest) Descriptor

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

func (*ReadRequest) Marshal

func (m *ReadRequest) Marshal() (dAtA []byte, err error)

func (*ReadRequest) MarshalTo

func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error)

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) Size

func (m *ReadRequest) Size() (n int)

func (*ReadRequest) String

func (m *ReadRequest) String() string

func (*ReadRequest) Unmarshal

func (m *ReadRequest) Unmarshal(dAtA []byte) error

type ReadRequest_Group added in v1.6.0

type ReadRequest_Group int32
const (
	// GroupNone returns all series as a single group.
	// The single GroupFrame.TagKeys will be the union of all tag keys.
	GroupNone ReadRequest_Group = 0
	// GroupAll returns a unique group for each series.
	// As an optimization, no GroupFrames will be generated.
	GroupAll ReadRequest_Group = 1
	// GroupBy returns a group for each unique value of the specified GroupKeys.
	GroupBy ReadRequest_Group = 2
	// GroupExcept in not implemented.
	GroupExcept ReadRequest_Group = 3
)

func (ReadRequest_Group) EnumDescriptor added in v1.6.0

func (ReadRequest_Group) EnumDescriptor() ([]byte, []int)

func (ReadRequest_Group) String added in v1.6.0

func (x ReadRequest_Group) String() string

type ReadRequest_HintFlags added in v1.6.0

type ReadRequest_HintFlags int32
const (
	HintNone     ReadRequest_HintFlags = 0
	HintNoPoints ReadRequest_HintFlags = 1
	HintNoSeries ReadRequest_HintFlags = 2
	// HintSchemaAllTime performs schema queries without using time ranges
	HintSchemaAllTime ReadRequest_HintFlags = 4
)

func (ReadRequest_HintFlags) EnumDescriptor added in v1.6.0

func (ReadRequest_HintFlags) EnumDescriptor() ([]byte, []int)

func (ReadRequest_HintFlags) String added in v1.6.0

func (x ReadRequest_HintFlags) String() string

type ReadResponse

type ReadResponse struct {
	Frames []ReadResponse_Frame `protobuf:"bytes,1,rep,name=frames" json:"frames"`
}

Response message for Storage.Read.

func (*ReadResponse) Descriptor

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

func (*ReadResponse) Marshal

func (m *ReadResponse) Marshal() (dAtA []byte, err error)

func (*ReadResponse) MarshalTo

func (m *ReadResponse) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) Reset

func (m *ReadResponse) Reset()

func (*ReadResponse) Size

func (m *ReadResponse) Size() (n int)

func (*ReadResponse) String

func (m *ReadResponse) String() string

func (*ReadResponse) Unmarshal

func (m *ReadResponse) Unmarshal(dAtA []byte) error

type ReadResponse_BooleanPointsFrame

type ReadResponse_BooleanPointsFrame struct {
	Timestamps []int64 `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []bool  `protobuf:"varint,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*ReadResponse_BooleanPointsFrame) Descriptor

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

func (*ReadResponse_BooleanPointsFrame) Marshal

func (m *ReadResponse_BooleanPointsFrame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_BooleanPointsFrame) MarshalTo

func (m *ReadResponse_BooleanPointsFrame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_BooleanPointsFrame) ProtoMessage

func (*ReadResponse_BooleanPointsFrame) ProtoMessage()

func (*ReadResponse_BooleanPointsFrame) Reset

func (*ReadResponse_BooleanPointsFrame) Size

func (m *ReadResponse_BooleanPointsFrame) Size() (n int)

func (*ReadResponse_BooleanPointsFrame) String

func (*ReadResponse_BooleanPointsFrame) Unmarshal

func (m *ReadResponse_BooleanPointsFrame) Unmarshal(dAtA []byte) error

type ReadResponse_DataType

type ReadResponse_DataType int32
const (
	DataTypeFloat    ReadResponse_DataType = 0
	DataTypeInteger  ReadResponse_DataType = 1
	DataTypeUnsigned ReadResponse_DataType = 2
	DataTypeBoolean  ReadResponse_DataType = 3
	DataTypeString   ReadResponse_DataType = 4
)

func (ReadResponse_DataType) EnumDescriptor

func (ReadResponse_DataType) EnumDescriptor() ([]byte, []int)

func (ReadResponse_DataType) String

func (x ReadResponse_DataType) String() string

type ReadResponse_FloatPointsFrame

type ReadResponse_FloatPointsFrame struct {
	Timestamps []int64   `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []float64 `protobuf:"fixed64,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*ReadResponse_FloatPointsFrame) Descriptor

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

func (*ReadResponse_FloatPointsFrame) Marshal

func (m *ReadResponse_FloatPointsFrame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_FloatPointsFrame) MarshalTo

func (m *ReadResponse_FloatPointsFrame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_FloatPointsFrame) ProtoMessage

func (*ReadResponse_FloatPointsFrame) ProtoMessage()

func (*ReadResponse_FloatPointsFrame) Reset

func (m *ReadResponse_FloatPointsFrame) Reset()

func (*ReadResponse_FloatPointsFrame) Size

func (m *ReadResponse_FloatPointsFrame) Size() (n int)

func (*ReadResponse_FloatPointsFrame) String

func (*ReadResponse_FloatPointsFrame) Unmarshal

func (m *ReadResponse_FloatPointsFrame) Unmarshal(dAtA []byte) error

type ReadResponse_Frame

type ReadResponse_Frame struct {
	// Types that are valid to be assigned to Data:
	//	*ReadResponse_Frame_Group
	//	*ReadResponse_Frame_Series
	//	*ReadResponse_Frame_FloatPoints
	//	*ReadResponse_Frame_IntegerPoints
	//	*ReadResponse_Frame_UnsignedPoints
	//	*ReadResponse_Frame_BooleanPoints
	//	*ReadResponse_Frame_StringPoints
	Data isReadResponse_Frame_Data `protobuf_oneof:"data"`
}

func (*ReadResponse_Frame) Descriptor

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

func (*ReadResponse_Frame) GetBooleanPoints

func (m *ReadResponse_Frame) GetBooleanPoints() *ReadResponse_BooleanPointsFrame

func (*ReadResponse_Frame) GetData

func (m *ReadResponse_Frame) GetData() isReadResponse_Frame_Data

func (*ReadResponse_Frame) GetFloatPoints

func (*ReadResponse_Frame) GetGroup added in v1.6.0

func (*ReadResponse_Frame) GetIntegerPoints

func (m *ReadResponse_Frame) GetIntegerPoints() *ReadResponse_IntegerPointsFrame

func (*ReadResponse_Frame) GetSeries

func (*ReadResponse_Frame) GetStringPoints

func (m *ReadResponse_Frame) GetStringPoints() *ReadResponse_StringPointsFrame

func (*ReadResponse_Frame) GetUnsignedPoints

func (m *ReadResponse_Frame) GetUnsignedPoints() *ReadResponse_UnsignedPointsFrame

func (*ReadResponse_Frame) Marshal

func (m *ReadResponse_Frame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_Frame) MarshalTo

func (m *ReadResponse_Frame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame) ProtoMessage

func (*ReadResponse_Frame) ProtoMessage()

func (*ReadResponse_Frame) Reset

func (m *ReadResponse_Frame) Reset()

func (*ReadResponse_Frame) Size

func (m *ReadResponse_Frame) Size() (n int)

func (*ReadResponse_Frame) String

func (m *ReadResponse_Frame) String() string

func (*ReadResponse_Frame) Unmarshal

func (m *ReadResponse_Frame) Unmarshal(dAtA []byte) error

func (*ReadResponse_Frame) XXX_OneofFuncs

func (*ReadResponse_Frame) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type ReadResponse_FrameType

type ReadResponse_FrameType int32
const (
	FrameTypeSeries ReadResponse_FrameType = 0
	FrameTypePoints ReadResponse_FrameType = 1
)

func (ReadResponse_FrameType) EnumDescriptor

func (ReadResponse_FrameType) EnumDescriptor() ([]byte, []int)

func (ReadResponse_FrameType) String

func (x ReadResponse_FrameType) String() string

type ReadResponse_Frame_BooleanPoints

type ReadResponse_Frame_BooleanPoints struct {
	BooleanPoints *ReadResponse_BooleanPointsFrame `protobuf:"bytes,5,opt,name=boolean_points,json=booleanPoints,oneof"`
}

func (*ReadResponse_Frame_BooleanPoints) MarshalTo

func (m *ReadResponse_Frame_BooleanPoints) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame_BooleanPoints) Size

func (m *ReadResponse_Frame_BooleanPoints) Size() (n int)

type ReadResponse_Frame_FloatPoints

type ReadResponse_Frame_FloatPoints struct {
	FloatPoints *ReadResponse_FloatPointsFrame `protobuf:"bytes,2,opt,name=float_points,json=floatPoints,oneof"`
}

func (*ReadResponse_Frame_FloatPoints) MarshalTo

func (m *ReadResponse_Frame_FloatPoints) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame_FloatPoints) Size

func (m *ReadResponse_Frame_FloatPoints) Size() (n int)

type ReadResponse_Frame_Group added in v1.6.0

type ReadResponse_Frame_Group struct {
	Group *ReadResponse_GroupFrame `protobuf:"bytes,7,opt,name=group,oneof"`
}

func (*ReadResponse_Frame_Group) MarshalTo added in v1.6.0

func (m *ReadResponse_Frame_Group) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame_Group) Size added in v1.6.0

func (m *ReadResponse_Frame_Group) Size() (n int)

type ReadResponse_Frame_IntegerPoints

type ReadResponse_Frame_IntegerPoints struct {
	IntegerPoints *ReadResponse_IntegerPointsFrame `protobuf:"bytes,3,opt,name=integer_points,json=integerPoints,oneof"`
}

func (*ReadResponse_Frame_IntegerPoints) MarshalTo

func (m *ReadResponse_Frame_IntegerPoints) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame_IntegerPoints) Size

func (m *ReadResponse_Frame_IntegerPoints) Size() (n int)

type ReadResponse_Frame_Series

type ReadResponse_Frame_Series struct {
	Series *ReadResponse_SeriesFrame `protobuf:"bytes,1,opt,name=series,oneof"`
}

func (*ReadResponse_Frame_Series) MarshalTo

func (m *ReadResponse_Frame_Series) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame_Series) Size

func (m *ReadResponse_Frame_Series) Size() (n int)

type ReadResponse_Frame_StringPoints

type ReadResponse_Frame_StringPoints struct {
	StringPoints *ReadResponse_StringPointsFrame `protobuf:"bytes,6,opt,name=string_points,json=stringPoints,oneof"`
}

func (*ReadResponse_Frame_StringPoints) MarshalTo

func (m *ReadResponse_Frame_StringPoints) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame_StringPoints) Size

func (m *ReadResponse_Frame_StringPoints) Size() (n int)

type ReadResponse_Frame_UnsignedPoints

type ReadResponse_Frame_UnsignedPoints struct {
	UnsignedPoints *ReadResponse_UnsignedPointsFrame `protobuf:"bytes,4,opt,name=unsigned_points,json=unsignedPoints,oneof"`
}

func (*ReadResponse_Frame_UnsignedPoints) MarshalTo

func (m *ReadResponse_Frame_UnsignedPoints) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_Frame_UnsignedPoints) Size

func (m *ReadResponse_Frame_UnsignedPoints) Size() (n int)

type ReadResponse_GroupFrame added in v1.6.0

type ReadResponse_GroupFrame struct {
	// TagKeys
	TagKeys [][]byte `protobuf:"bytes,1,rep,name=tag_keys,json=tagKeys" json:"tag_keys,omitempty"`
	// PartitionKeyVals is the values of the partition key for this group, order matching ReadRequest.GroupKeys
	PartitionKeyVals [][]byte `protobuf:"bytes,2,rep,name=partition_key_vals,json=partitionKeyVals" json:"partition_key_vals,omitempty"`
}

func (*ReadResponse_GroupFrame) Descriptor added in v1.6.0

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

func (*ReadResponse_GroupFrame) Marshal added in v1.6.0

func (m *ReadResponse_GroupFrame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_GroupFrame) MarshalTo added in v1.6.0

func (m *ReadResponse_GroupFrame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_GroupFrame) ProtoMessage added in v1.6.0

func (*ReadResponse_GroupFrame) ProtoMessage()

func (*ReadResponse_GroupFrame) Reset added in v1.6.0

func (m *ReadResponse_GroupFrame) Reset()

func (*ReadResponse_GroupFrame) Size added in v1.6.0

func (m *ReadResponse_GroupFrame) Size() (n int)

func (*ReadResponse_GroupFrame) String added in v1.6.0

func (m *ReadResponse_GroupFrame) String() string

func (*ReadResponse_GroupFrame) Unmarshal added in v1.6.0

func (m *ReadResponse_GroupFrame) Unmarshal(dAtA []byte) error

type ReadResponse_IntegerPointsFrame

type ReadResponse_IntegerPointsFrame struct {
	Timestamps []int64 `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []int64 `protobuf:"varint,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*ReadResponse_IntegerPointsFrame) Descriptor

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

func (*ReadResponse_IntegerPointsFrame) Marshal

func (m *ReadResponse_IntegerPointsFrame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_IntegerPointsFrame) MarshalTo

func (m *ReadResponse_IntegerPointsFrame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_IntegerPointsFrame) ProtoMessage

func (*ReadResponse_IntegerPointsFrame) ProtoMessage()

func (*ReadResponse_IntegerPointsFrame) Reset

func (*ReadResponse_IntegerPointsFrame) Size

func (m *ReadResponse_IntegerPointsFrame) Size() (n int)

func (*ReadResponse_IntegerPointsFrame) String

func (*ReadResponse_IntegerPointsFrame) Unmarshal

func (m *ReadResponse_IntegerPointsFrame) Unmarshal(dAtA []byte) error

type ReadResponse_SeriesFrame

type ReadResponse_SeriesFrame struct {
	Tags     []Tag                 `protobuf:"bytes,1,rep,name=tags" json:"tags"`
	DataType ReadResponse_DataType `` /* 161-byte string literal not displayed */
}

func (*ReadResponse_SeriesFrame) Descriptor

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

func (*ReadResponse_SeriesFrame) Marshal

func (m *ReadResponse_SeriesFrame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_SeriesFrame) MarshalTo

func (m *ReadResponse_SeriesFrame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_SeriesFrame) ProtoMessage

func (*ReadResponse_SeriesFrame) ProtoMessage()

func (*ReadResponse_SeriesFrame) Reset

func (m *ReadResponse_SeriesFrame) Reset()

func (*ReadResponse_SeriesFrame) Size

func (m *ReadResponse_SeriesFrame) Size() (n int)

func (*ReadResponse_SeriesFrame) String

func (m *ReadResponse_SeriesFrame) String() string

func (*ReadResponse_SeriesFrame) Unmarshal

func (m *ReadResponse_SeriesFrame) Unmarshal(dAtA []byte) error

type ReadResponse_StringPointsFrame

type ReadResponse_StringPointsFrame struct {
	Timestamps []int64  `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []string `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"`
}

func (*ReadResponse_StringPointsFrame) Descriptor

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

func (*ReadResponse_StringPointsFrame) Marshal

func (m *ReadResponse_StringPointsFrame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_StringPointsFrame) MarshalTo

func (m *ReadResponse_StringPointsFrame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_StringPointsFrame) ProtoMessage

func (*ReadResponse_StringPointsFrame) ProtoMessage()

func (*ReadResponse_StringPointsFrame) Reset

func (m *ReadResponse_StringPointsFrame) Reset()

func (*ReadResponse_StringPointsFrame) Size

func (m *ReadResponse_StringPointsFrame) Size() (n int)

func (*ReadResponse_StringPointsFrame) String

func (*ReadResponse_StringPointsFrame) Unmarshal

func (m *ReadResponse_StringPointsFrame) Unmarshal(dAtA []byte) error

type ReadResponse_UnsignedPointsFrame

type ReadResponse_UnsignedPointsFrame struct {
	Timestamps []int64  `protobuf:"fixed64,1,rep,packed,name=timestamps" json:"timestamps,omitempty"`
	Values     []uint64 `protobuf:"varint,2,rep,packed,name=values" json:"values,omitempty"`
}

func (*ReadResponse_UnsignedPointsFrame) Descriptor

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

func (*ReadResponse_UnsignedPointsFrame) Marshal

func (m *ReadResponse_UnsignedPointsFrame) Marshal() (dAtA []byte, err error)

func (*ReadResponse_UnsignedPointsFrame) MarshalTo

func (m *ReadResponse_UnsignedPointsFrame) MarshalTo(dAtA []byte) (int, error)

func (*ReadResponse_UnsignedPointsFrame) ProtoMessage

func (*ReadResponse_UnsignedPointsFrame) ProtoMessage()

func (*ReadResponse_UnsignedPointsFrame) Reset

func (*ReadResponse_UnsignedPointsFrame) Size

func (m *ReadResponse_UnsignedPointsFrame) Size() (n int)

func (*ReadResponse_UnsignedPointsFrame) String

func (*ReadResponse_UnsignedPointsFrame) Unmarshal

func (m *ReadResponse_UnsignedPointsFrame) Unmarshal(dAtA []byte) error

type ResultSet

type ResultSet struct {
	// contains filtered or unexported fields
}

func (*ResultSet) Close

func (r *ResultSet) Close()

Close closes the result set. Close is idempotent.

func (*ResultSet) Cursor

func (r *ResultSet) Cursor() tsdb.Cursor

func (*ResultSet) Next

func (r *ResultSet) Next() bool

Next returns true if there are more results available.

func (*ResultSet) Tags

func (r *ResultSet) Tags() models.Tags

type Results added in v1.6.0

type Results interface {
	Close()
	Next() bool
	Cursor() tsdb.Cursor
	Tags() models.Tags
}

type Service

type Service struct {
	Store      *Store
	TSDBStore  *tsdb.Store
	MetaClient StorageMetaClient
	// contains filtered or unexported fields
}

Service manages the listener and handler for an HTTP endpoint.

func NewService

func NewService(c Config) *Service

NewService returns a new instance of Service.

func (*Service) Close

func (s *Service) Close() error

func (*Service) Open

func (s *Service) Open() error

Open starts the service.

func (*Service) WithLogger

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

WithLogger sets the logger for the service.

type StorageClient

type StorageClient interface {
	// Read performs a read operation using the given ReadRequest
	Read(ctx context.Context, in *ReadRequest) (Storage_ReadClient, error)
	// Capabilities returns a map of keys and values identifying the capabilities supported by the storage engine
	Capabilities(ctx context.Context, in *google_protobuf1.Empty) (*CapabilitiesResponse, error)
	Hints(ctx context.Context, in *google_protobuf1.Empty) (*HintsResponse, error)
}

func NewStorageClient

func NewStorageClient(cc *yarpc.ClientConn) StorageClient

type StorageMetaClient added in v1.5.0

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

type StorageServer

type StorageServer interface {
	// Read performs a read operation using the given ReadRequest
	Read(*ReadRequest, Storage_ReadServer) error
	// Capabilities returns a map of keys and values identifying the capabilities supported by the storage engine
	Capabilities(context.Context, *google_protobuf1.Empty) (*CapabilitiesResponse, error)
	Hints(context.Context, *google_protobuf1.Empty) (*HintsResponse, error)
}

type Storage_ReadClient

type Storage_ReadClient interface {
	Recv() (*ReadResponse, error)
	yarpc.ClientStream
}

type Storage_ReadServer

type Storage_ReadServer interface {
	Send(*ReadResponse) error
	yarpc.ServerStream
}

type Store

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

func NewStore

func NewStore() *Store

func (*Store) GroupRead added in v1.6.0

func (s *Store) GroupRead(ctx context.Context, req *ReadRequest) (*groupResultSet, error)

func (*Store) Read

func (s *Store) Read(ctx context.Context, req *ReadRequest) (Results, error)

func (*Store) WithLogger

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

WithLogger sets the logger for the service.

type Tag

type Tag struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*Tag) Descriptor

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

func (*Tag) Marshal

func (m *Tag) Marshal() (dAtA []byte, err error)

func (*Tag) MarshalTo

func (m *Tag) MarshalTo(dAtA []byte) (int, error)

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) Reset

func (m *Tag) Reset()

func (*Tag) Size

func (m *Tag) Size() (n int)

func (*Tag) String

func (m *Tag) String() string

func (*Tag) Unmarshal

func (m *Tag) Unmarshal(dAtA []byte) error

type TimestampRange

type TimestampRange struct {
	// Start defines the inclusive lower bound.
	Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	// End defines the inclusive upper bound.
	End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
}

Specifies a continuous range of nanosecond timestamps.

func (*TimestampRange) Descriptor

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

func (*TimestampRange) Marshal

func (m *TimestampRange) Marshal() (dAtA []byte, err error)

func (*TimestampRange) MarshalTo

func (m *TimestampRange) MarshalTo(dAtA []byte) (int, error)

func (*TimestampRange) ProtoMessage

func (*TimestampRange) ProtoMessage()

func (*TimestampRange) Reset

func (m *TimestampRange) Reset()

func (*TimestampRange) Size

func (m *TimestampRange) Size() (n int)

func (*TimestampRange) String

func (m *TimestampRange) String() string

func (*TimestampRange) Unmarshal

func (m *TimestampRange) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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