querypb

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var EngineType_name = map[int32]string{
	0: "default",
	1: "prometheus",
	2: "thanos",
}
View Source
var EngineType_value = map[string]int32{
	"default":    0,
	"prometheus": 1,
	"thanos":     2,
}

Functions

func RegisterQueryServer

func RegisterQueryServer(s *grpc.Server, srv QueryServer)

func StoreMatchersToLabelMatchers

func StoreMatchersToLabelMatchers(matchers []StoreMatchers) ([][]*labels.Matcher, error)

Types

type EngineType added in v0.32.0

type EngineType int32
const (
	EngineType_default    EngineType = 0
	EngineType_prometheus EngineType = 1
	EngineType_thanos     EngineType = 2
)

func (EngineType) EnumDescriptor added in v0.32.0

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

func (EngineType) String added in v0.32.0

func (x EngineType) String() string

type QueryClient

type QueryClient interface {
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (Query_QueryClient, error)
	QueryRange(ctx context.Context, in *QueryRangeRequest, opts ...grpc.CallOption) (Query_QueryRangeClient, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc *grpc.ClientConn) QueryClient

type QueryRangeRequest

type QueryRangeRequest struct {
	Query                 string             `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	StartTimeSeconds      int64              `protobuf:"varint,2,opt,name=start_time_seconds,json=startTimeSeconds,proto3" json:"start_time_seconds,omitempty"`
	EndTimeSeconds        int64              `protobuf:"varint,3,opt,name=end_time_seconds,json=endTimeSeconds,proto3" json:"end_time_seconds,omitempty"`
	IntervalSeconds       int64              `protobuf:"varint,4,opt,name=interval_seconds,json=intervalSeconds,proto3" json:"interval_seconds,omitempty"`
	TimeoutSeconds        int64              `protobuf:"varint,5,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
	MaxResolutionSeconds  int64              `protobuf:"varint,6,opt,name=max_resolution_seconds,json=maxResolutionSeconds,proto3" json:"max_resolution_seconds,omitempty"`
	ReplicaLabels         []string           `protobuf:"bytes,7,rep,name=replica_labels,json=replicaLabels,proto3" json:"replica_labels,omitempty"`
	StoreMatchers         []StoreMatchers    `protobuf:"bytes,8,rep,name=storeMatchers,proto3" json:"storeMatchers"`
	EnableDedup           bool               `protobuf:"varint,9,opt,name=enableDedup,proto3" json:"enableDedup,omitempty"`
	EnablePartialResponse bool               `protobuf:"varint,10,opt,name=enablePartialResponse,proto3" json:"enablePartialResponse,omitempty"`
	EnableQueryPushdown   bool               `protobuf:"varint,11,opt,name=enableQueryPushdown,proto3" json:"enableQueryPushdown,omitempty"`
	SkipChunks            bool               `protobuf:"varint,12,opt,name=skipChunks,proto3" json:"skipChunks,omitempty"`
	ShardInfo             *storepb.ShardInfo `protobuf:"bytes,13,opt,name=shard_info,json=shardInfo,proto3" json:"shard_info,omitempty"`
	LookbackDeltaSeconds  int64              `protobuf:"varint,14,opt,name=lookback_delta_seconds,json=lookbackDeltaSeconds,proto3" json:"lookback_delta_seconds,omitempty"`
	Engine                EngineType         `protobuf:"varint,15,opt,name=engine,proto3,enum=thanos.EngineType" json:"engine,omitempty"`
}

func (*QueryRangeRequest) Descriptor

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

func (*QueryRangeRequest) Marshal

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

func (*QueryRangeRequest) MarshalTo

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

func (*QueryRangeRequest) MarshalToSizedBuffer

func (m *QueryRangeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRangeRequest) ProtoMessage

func (*QueryRangeRequest) ProtoMessage()

func (*QueryRangeRequest) Reset

func (m *QueryRangeRequest) Reset()

func (*QueryRangeRequest) Size

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

func (*QueryRangeRequest) String

func (m *QueryRangeRequest) String() string

func (*QueryRangeRequest) Unmarshal

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

func (*QueryRangeRequest) XXX_DiscardUnknown

func (m *QueryRangeRequest) XXX_DiscardUnknown()

func (*QueryRangeRequest) XXX_Marshal

func (m *QueryRangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRangeRequest) XXX_Merge

func (m *QueryRangeRequest) XXX_Merge(src proto.Message)

func (*QueryRangeRequest) XXX_Size

func (m *QueryRangeRequest) XXX_Size() int

func (*QueryRangeRequest) XXX_Unmarshal

func (m *QueryRangeRequest) XXX_Unmarshal(b []byte) error

type QueryRangeResponse

type QueryRangeResponse struct {
	// Types that are valid to be assigned to Result:
	//	*QueryRangeResponse_Warnings
	//	*QueryRangeResponse_Timeseries
	Result isQueryRangeResponse_Result `protobuf_oneof:"result"`
}

func NewQueryRangeResponse

func NewQueryRangeResponse(series *prompb.TimeSeries) *QueryRangeResponse

func NewQueryRangeWarningsResponse

func NewQueryRangeWarningsResponse(errs ...error) *QueryRangeResponse

func (*QueryRangeResponse) Descriptor

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

func (*QueryRangeResponse) GetResult

func (m *QueryRangeResponse) GetResult() isQueryRangeResponse_Result

func (*QueryRangeResponse) GetTimeseries

func (m *QueryRangeResponse) GetTimeseries() *prompb.TimeSeries

func (*QueryRangeResponse) GetWarnings

func (m *QueryRangeResponse) GetWarnings() string

func (*QueryRangeResponse) Marshal

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

func (*QueryRangeResponse) MarshalTo

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

func (*QueryRangeResponse) MarshalToSizedBuffer

func (m *QueryRangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRangeResponse) ProtoMessage

func (*QueryRangeResponse) ProtoMessage()

func (*QueryRangeResponse) Reset

func (m *QueryRangeResponse) Reset()

func (*QueryRangeResponse) Size

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

func (*QueryRangeResponse) String

func (m *QueryRangeResponse) String() string

func (*QueryRangeResponse) Unmarshal

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

func (*QueryRangeResponse) XXX_DiscardUnknown

func (m *QueryRangeResponse) XXX_DiscardUnknown()

func (*QueryRangeResponse) XXX_Marshal

func (m *QueryRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRangeResponse) XXX_Merge

func (m *QueryRangeResponse) XXX_Merge(src proto.Message)

func (*QueryRangeResponse) XXX_OneofWrappers

func (*QueryRangeResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*QueryRangeResponse) XXX_Size

func (m *QueryRangeResponse) XXX_Size() int

func (*QueryRangeResponse) XXX_Unmarshal

func (m *QueryRangeResponse) XXX_Unmarshal(b []byte) error

type QueryRangeResponse_Timeseries

type QueryRangeResponse_Timeseries struct {
	Timeseries *prompb.TimeSeries `protobuf:"bytes,2,opt,name=timeseries,proto3,oneof" json:"timeseries,omitempty"`
}

func (*QueryRangeResponse_Timeseries) MarshalTo

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

func (*QueryRangeResponse_Timeseries) MarshalToSizedBuffer

func (m *QueryRangeResponse_Timeseries) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRangeResponse_Timeseries) Size

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

type QueryRangeResponse_Warnings

type QueryRangeResponse_Warnings struct {
	Warnings string `protobuf:"bytes,1,opt,name=warnings,proto3,oneof" json:"warnings,omitempty"`
}

func (*QueryRangeResponse_Warnings) MarshalTo

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

func (*QueryRangeResponse_Warnings) MarshalToSizedBuffer

func (m *QueryRangeResponse_Warnings) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRangeResponse_Warnings) Size

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

type QueryRequest

type QueryRequest struct {
	Query                 string             `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	TimeSeconds           int64              `protobuf:"varint,2,opt,name=time_seconds,json=timeSeconds,proto3" json:"time_seconds,omitempty"`
	TimeoutSeconds        int64              `protobuf:"varint,3,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
	MaxResolutionSeconds  int64              `protobuf:"varint,4,opt,name=max_resolution_seconds,json=maxResolutionSeconds,proto3" json:"max_resolution_seconds,omitempty"`
	ReplicaLabels         []string           `protobuf:"bytes,5,rep,name=replica_labels,json=replicaLabels,proto3" json:"replica_labels,omitempty"`
	StoreMatchers         []StoreMatchers    `protobuf:"bytes,6,rep,name=storeMatchers,proto3" json:"storeMatchers"`
	EnableDedup           bool               `protobuf:"varint,7,opt,name=enableDedup,proto3" json:"enableDedup,omitempty"`
	EnablePartialResponse bool               `protobuf:"varint,8,opt,name=enablePartialResponse,proto3" json:"enablePartialResponse,omitempty"`
	EnableQueryPushdown   bool               `protobuf:"varint,9,opt,name=enableQueryPushdown,proto3" json:"enableQueryPushdown,omitempty"`
	SkipChunks            bool               `protobuf:"varint,10,opt,name=skipChunks,proto3" json:"skipChunks,omitempty"`
	ShardInfo             *storepb.ShardInfo `protobuf:"bytes,11,opt,name=shard_info,json=shardInfo,proto3" json:"shard_info,omitempty"`
	LookbackDeltaSeconds  int64              `protobuf:"varint,12,opt,name=lookback_delta_seconds,json=lookbackDeltaSeconds,proto3" json:"lookback_delta_seconds,omitempty"`
	Engine                EngineType         `protobuf:"varint,13,opt,name=engine,proto3,enum=thanos.EngineType" json:"engine,omitempty"`
}

func (*QueryRequest) Descriptor

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

func (*QueryRequest) Marshal

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

func (*QueryRequest) MarshalTo

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

func (*QueryRequest) MarshalToSizedBuffer

func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) Reset

func (m *QueryRequest) Reset()

func (*QueryRequest) Size

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

func (*QueryRequest) String

func (m *QueryRequest) String() string

func (*QueryRequest) Unmarshal

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

func (*QueryRequest) XXX_DiscardUnknown

func (m *QueryRequest) XXX_DiscardUnknown()

func (*QueryRequest) XXX_Marshal

func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryRequest) XXX_Merge

func (m *QueryRequest) XXX_Merge(src proto.Message)

func (*QueryRequest) XXX_Size

func (m *QueryRequest) XXX_Size() int

func (*QueryRequest) XXX_Unmarshal

func (m *QueryRequest) XXX_Unmarshal(b []byte) error

type QueryResponse

type QueryResponse struct {
	// Types that are valid to be assigned to Result:
	//	*QueryResponse_Warnings
	//	*QueryResponse_Timeseries
	Result isQueryResponse_Result `protobuf_oneof:"result"`
}

func NewQueryResponse

func NewQueryResponse(series *prompb.TimeSeries) *QueryResponse

func NewQueryWarningsResponse

func NewQueryWarningsResponse(errs ...error) *QueryResponse

func (*QueryResponse) Descriptor

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

func (*QueryResponse) GetResult

func (m *QueryResponse) GetResult() isQueryResponse_Result

func (*QueryResponse) GetTimeseries

func (m *QueryResponse) GetTimeseries() *prompb.TimeSeries

func (*QueryResponse) GetWarnings

func (m *QueryResponse) GetWarnings() string

func (*QueryResponse) Marshal

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

func (*QueryResponse) MarshalTo

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

func (*QueryResponse) MarshalToSizedBuffer

func (m *QueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) Reset

func (m *QueryResponse) Reset()

func (*QueryResponse) Size

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

func (*QueryResponse) String

func (m *QueryResponse) String() string

func (*QueryResponse) Unmarshal

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

func (*QueryResponse) XXX_DiscardUnknown

func (m *QueryResponse) XXX_DiscardUnknown()

func (*QueryResponse) XXX_Marshal

func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryResponse) XXX_Merge

func (m *QueryResponse) XXX_Merge(src proto.Message)

func (*QueryResponse) XXX_OneofWrappers

func (*QueryResponse) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*QueryResponse) XXX_Size

func (m *QueryResponse) XXX_Size() int

func (*QueryResponse) XXX_Unmarshal

func (m *QueryResponse) XXX_Unmarshal(b []byte) error

type QueryResponse_Timeseries

type QueryResponse_Timeseries struct {
	Timeseries *prompb.TimeSeries `protobuf:"bytes,2,opt,name=timeseries,proto3,oneof" json:"timeseries,omitempty"`
}

func (*QueryResponse_Timeseries) MarshalTo

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

func (*QueryResponse_Timeseries) MarshalToSizedBuffer

func (m *QueryResponse_Timeseries) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Timeseries) Size

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

type QueryResponse_Warnings

type QueryResponse_Warnings struct {
	Warnings string `protobuf:"bytes,1,opt,name=warnings,proto3,oneof" json:"warnings,omitempty"`
}

func (*QueryResponse_Warnings) MarshalTo

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

func (*QueryResponse_Warnings) MarshalToSizedBuffer

func (m *QueryResponse_Warnings) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryResponse_Warnings) Size

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

type QueryServer

type QueryServer interface {
	Query(*QueryRequest, Query_QueryServer) error
	QueryRange(*QueryRangeRequest, Query_QueryRangeServer) error
}

QueryServer is the server API for Query service.

type Query_QueryClient

type Query_QueryClient interface {
	Recv() (*QueryResponse, error)
	grpc.ClientStream
}

type Query_QueryRangeClient

type Query_QueryRangeClient interface {
	Recv() (*QueryRangeResponse, error)
	grpc.ClientStream
}

type Query_QueryRangeServer

type Query_QueryRangeServer interface {
	Send(*QueryRangeResponse) error
	grpc.ServerStream
}

type Query_QueryServer

type Query_QueryServer interface {
	Send(*QueryResponse) error
	grpc.ServerStream
}

type StoreMatchers

type StoreMatchers struct {
	LabelMatchers []storepb.LabelMatcher `protobuf:"bytes,1,rep,name=labelMatchers,proto3" json:"labelMatchers"`
}

func (*StoreMatchers) Descriptor

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

func (*StoreMatchers) Marshal

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

func (*StoreMatchers) MarshalTo

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

func (*StoreMatchers) MarshalToSizedBuffer

func (m *StoreMatchers) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StoreMatchers) ProtoMessage

func (*StoreMatchers) ProtoMessage()

func (*StoreMatchers) Reset

func (m *StoreMatchers) Reset()

func (*StoreMatchers) Size

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

func (*StoreMatchers) String

func (m *StoreMatchers) String() string

func (*StoreMatchers) Unmarshal

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

func (*StoreMatchers) XXX_DiscardUnknown

func (m *StoreMatchers) XXX_DiscardUnknown()

func (*StoreMatchers) XXX_Marshal

func (m *StoreMatchers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StoreMatchers) XXX_Merge

func (m *StoreMatchers) XXX_Merge(src proto.Message)

func (*StoreMatchers) XXX_Size

func (m *StoreMatchers) XXX_Size() int

func (*StoreMatchers) XXX_Unmarshal

func (m *StoreMatchers) XXX_Unmarshal(b []byte) error

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Query

func (*UnimplementedQueryServer) QueryRange

Jump to

Keyboard shortcuts

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