Help us shape the future of Go! Take the 2026 Go Developer Survey

instantquery

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthInstantquery = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInstantquery   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	InstantQueryCodec tripperware.Codec = newInstantQueryCodec()
)

Functions

func Middlewares

func Middlewares(
	log log.Logger,
	limits tripperware.Limits,
) ([]tripperware.Middleware, error)

Types

type Matrix

type Matrix struct {
	SampleStreams []tripperware.SampleStream `protobuf:"bytes,1,rep,name=sampleStreams,proto3" json:"sampleStreams"`
}

func (*Matrix) Descriptor

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

func (*Matrix) Equal

func (this *Matrix) Equal(that interface{}) bool

func (*Matrix) GetSampleStreams

func (m *Matrix) GetSampleStreams() []tripperware.SampleStream

func (*Matrix) GoString

func (this *Matrix) GoString() string

func (*Matrix) Marshal

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

func (*Matrix) MarshalTo

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

func (*Matrix) MarshalToSizedBuffer

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

func (*Matrix) ProtoMessage

func (*Matrix) ProtoMessage()

func (*Matrix) Reset

func (m *Matrix) Reset()

func (*Matrix) Size

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

func (*Matrix) String

func (this *Matrix) String() string

func (*Matrix) Unmarshal

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

func (*Matrix) XXX_DiscardUnknown

func (m *Matrix) XXX_DiscardUnknown()

func (*Matrix) XXX_Marshal

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

func (*Matrix) XXX_Merge

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

func (*Matrix) XXX_Size

func (m *Matrix) XXX_Size() int

func (*Matrix) XXX_Unmarshal

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

type PrometheusInstantQueryData

type PrometheusInstantQueryData struct {
	ResultType string                               `protobuf:"bytes,1,opt,name=ResultType,proto3" json:"resultType"`
	Result     PrometheusInstantQueryResult         `protobuf:"bytes,2,opt,name=Result,proto3" json:"result"`
	Stats      *tripperware.PrometheusResponseStats `protobuf:"bytes,3,opt,name=stats,proto3" json:"stats,omitempty"`
}

func (*PrometheusInstantQueryData) Descriptor

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

func (*PrometheusInstantQueryData) Equal

func (this *PrometheusInstantQueryData) Equal(that interface{}) bool

func (*PrometheusInstantQueryData) GetResult

func (*PrometheusInstantQueryData) GetResultType

func (m *PrometheusInstantQueryData) GetResultType() string

func (*PrometheusInstantQueryData) GetStats

func (*PrometheusInstantQueryData) GoString

func (this *PrometheusInstantQueryData) GoString() string

func (*PrometheusInstantQueryData) Marshal

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

func (*PrometheusInstantQueryData) MarshalJSON

func (s *PrometheusInstantQueryData) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*PrometheusInstantQueryData) MarshalTo

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

func (*PrometheusInstantQueryData) MarshalToSizedBuffer

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

func (*PrometheusInstantQueryData) ProtoMessage

func (*PrometheusInstantQueryData) ProtoMessage()

func (*PrometheusInstantQueryData) Reset

func (m *PrometheusInstantQueryData) Reset()

func (*PrometheusInstantQueryData) Size

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

func (*PrometheusInstantQueryData) String

func (this *PrometheusInstantQueryData) String() string

func (*PrometheusInstantQueryData) Unmarshal

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

func (*PrometheusInstantQueryData) UnmarshalJSON

func (s *PrometheusInstantQueryData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*PrometheusInstantQueryData) XXX_DiscardUnknown

func (m *PrometheusInstantQueryData) XXX_DiscardUnknown()

func (*PrometheusInstantQueryData) XXX_Marshal

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

func (*PrometheusInstantQueryData) XXX_Merge

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

func (*PrometheusInstantQueryData) XXX_Size

func (m *PrometheusInstantQueryData) XXX_Size() int

func (*PrometheusInstantQueryData) XXX_Unmarshal

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

type PrometheusInstantQueryResponse

type PrometheusInstantQueryResponse struct {
	Status    string                                  `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"`
	Data      PrometheusInstantQueryData              `protobuf:"bytes,2,opt,name=Data,proto3" json:"data,omitempty"`
	ErrorType string                                  `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"`
	Error     string                                  `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"`
	Headers   []*tripperware.PrometheusResponseHeader `protobuf:"bytes,5,rep,name=Headers,proto3" json:"-"`
}

func NewEmptyPrometheusInstantQueryResponse

func NewEmptyPrometheusInstantQueryResponse() *PrometheusInstantQueryResponse

NewEmptyPrometheusInstantQueryResponse returns an empty successful Prometheus query range response.

func (*PrometheusInstantQueryResponse) Descriptor

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

func (*PrometheusInstantQueryResponse) Equal

func (this *PrometheusInstantQueryResponse) Equal(that interface{}) bool

func (*PrometheusInstantQueryResponse) GetData

func (*PrometheusInstantQueryResponse) GetError

func (m *PrometheusInstantQueryResponse) GetError() string

func (*PrometheusInstantQueryResponse) GetErrorType

func (m *PrometheusInstantQueryResponse) GetErrorType() string

func (*PrometheusInstantQueryResponse) GetHeaders

func (*PrometheusInstantQueryResponse) GetStatus

func (m *PrometheusInstantQueryResponse) GetStatus() string

func (*PrometheusInstantQueryResponse) GoString

func (this *PrometheusInstantQueryResponse) GoString() string

func (*PrometheusInstantQueryResponse) HTTPHeaders

func (resp *PrometheusInstantQueryResponse) HTTPHeaders() map[string][]string

func (*PrometheusInstantQueryResponse) Marshal

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

func (*PrometheusInstantQueryResponse) MarshalTo

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

func (*PrometheusInstantQueryResponse) MarshalToSizedBuffer

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

func (*PrometheusInstantQueryResponse) ProtoMessage

func (*PrometheusInstantQueryResponse) ProtoMessage()

func (*PrometheusInstantQueryResponse) Reset

func (m *PrometheusInstantQueryResponse) Reset()

func (*PrometheusInstantQueryResponse) Size

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

func (*PrometheusInstantQueryResponse) String

func (this *PrometheusInstantQueryResponse) String() string

func (*PrometheusInstantQueryResponse) Unmarshal

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

func (*PrometheusInstantQueryResponse) XXX_DiscardUnknown

func (m *PrometheusInstantQueryResponse) XXX_DiscardUnknown()

func (*PrometheusInstantQueryResponse) XXX_Marshal

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

func (*PrometheusInstantQueryResponse) XXX_Merge

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

func (*PrometheusInstantQueryResponse) XXX_Size

func (m *PrometheusInstantQueryResponse) XXX_Size() int

func (*PrometheusInstantQueryResponse) XXX_Unmarshal

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

type PrometheusInstantQueryResult

type PrometheusInstantQueryResult struct {
	// Types that are valid to be assigned to Result:
	//
	//	*PrometheusInstantQueryResult_Vector
	//	*PrometheusInstantQueryResult_RawBytes
	//	*PrometheusInstantQueryResult_Matrix
	Result isPrometheusInstantQueryResult_Result `protobuf_oneof:"result"`
}

func (*PrometheusInstantQueryResult) Descriptor

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

func (*PrometheusInstantQueryResult) Equal

func (this *PrometheusInstantQueryResult) Equal(that interface{}) bool

func (*PrometheusInstantQueryResult) GetMatrix

func (m *PrometheusInstantQueryResult) GetMatrix() *Matrix

func (*PrometheusInstantQueryResult) GetRawBytes

func (m *PrometheusInstantQueryResult) GetRawBytes() []byte

func (*PrometheusInstantQueryResult) GetResult

func (m *PrometheusInstantQueryResult) GetResult() isPrometheusInstantQueryResult_Result

func (*PrometheusInstantQueryResult) GetVector

func (m *PrometheusInstantQueryResult) GetVector() *Vector

func (*PrometheusInstantQueryResult) GoString

func (this *PrometheusInstantQueryResult) GoString() string

func (*PrometheusInstantQueryResult) Marshal

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

func (*PrometheusInstantQueryResult) MarshalTo

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

func (*PrometheusInstantQueryResult) MarshalToSizedBuffer

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

func (*PrometheusInstantQueryResult) ProtoMessage

func (*PrometheusInstantQueryResult) ProtoMessage()

func (*PrometheusInstantQueryResult) Reset

func (m *PrometheusInstantQueryResult) Reset()

func (*PrometheusInstantQueryResult) Size

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

func (*PrometheusInstantQueryResult) String

func (this *PrometheusInstantQueryResult) String() string

func (*PrometheusInstantQueryResult) Unmarshal

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

func (*PrometheusInstantQueryResult) XXX_DiscardUnknown

func (m *PrometheusInstantQueryResult) XXX_DiscardUnknown()

func (*PrometheusInstantQueryResult) XXX_Marshal

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

func (*PrometheusInstantQueryResult) XXX_Merge

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

func (*PrometheusInstantQueryResult) XXX_OneofWrappers

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

XXX_OneofWrappers is for the internal use of the proto package.

func (*PrometheusInstantQueryResult) XXX_Size

func (m *PrometheusInstantQueryResult) XXX_Size() int

func (*PrometheusInstantQueryResult) XXX_Unmarshal

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

type PrometheusInstantQueryResult_Matrix

type PrometheusInstantQueryResult_Matrix struct {
	Matrix *Matrix `protobuf:"bytes,3,opt,name=matrix,proto3,oneof"`
}

func (*PrometheusInstantQueryResult_Matrix) Equal

func (this *PrometheusInstantQueryResult_Matrix) Equal(that interface{}) bool

func (*PrometheusInstantQueryResult_Matrix) GoString

func (*PrometheusInstantQueryResult_Matrix) MarshalTo

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

func (*PrometheusInstantQueryResult_Matrix) MarshalToSizedBuffer

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

func (*PrometheusInstantQueryResult_Matrix) Size

func (*PrometheusInstantQueryResult_Matrix) String

type PrometheusInstantQueryResult_RawBytes

type PrometheusInstantQueryResult_RawBytes struct {
	RawBytes []byte `protobuf:"bytes,2,opt,name=rawBytes,proto3,oneof"`
}

func (*PrometheusInstantQueryResult_RawBytes) Equal

func (this *PrometheusInstantQueryResult_RawBytes) Equal(that interface{}) bool

func (*PrometheusInstantQueryResult_RawBytes) GoString

func (*PrometheusInstantQueryResult_RawBytes) MarshalTo

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

func (*PrometheusInstantQueryResult_RawBytes) MarshalToSizedBuffer

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

func (*PrometheusInstantQueryResult_RawBytes) Size

func (*PrometheusInstantQueryResult_RawBytes) String

type PrometheusInstantQueryResult_Vector

type PrometheusInstantQueryResult_Vector struct {
	Vector *Vector `protobuf:"bytes,1,opt,name=vector,proto3,oneof"`
}

func (*PrometheusInstantQueryResult_Vector) Equal

func (this *PrometheusInstantQueryResult_Vector) Equal(that interface{}) bool

func (*PrometheusInstantQueryResult_Vector) GoString

func (*PrometheusInstantQueryResult_Vector) MarshalTo

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

func (*PrometheusInstantQueryResult_Vector) MarshalToSizedBuffer

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

func (*PrometheusInstantQueryResult_Vector) Size

func (*PrometheusInstantQueryResult_Vector) String

type PrometheusRequest

type PrometheusRequest struct {
	tripperware.Request
	Time    int64
	Stats   string
	Query   string
	Path    string
	Headers http.Header
}

func (*PrometheusRequest) GetEnd

func (r *PrometheusRequest) GetEnd() int64

GetEnd returns always 0 for instant query.

func (*PrometheusRequest) GetQuery

func (r *PrometheusRequest) GetQuery() string

GetQuery returns the query of the request.

func (*PrometheusRequest) GetStart

func (r *PrometheusRequest) GetStart() int64

GetStart returns always 0 for instant query.

func (*PrometheusRequest) GetStats

func (r *PrometheusRequest) GetStats() string

GetStats returns the stats of the request.

func (*PrometheusRequest) GetStep

func (r *PrometheusRequest) GetStep() int64

GetStep returns always 0 for instant query.

func (*PrometheusRequest) GetTime

func (r *PrometheusRequest) GetTime() int64

GetTime returns time in milliseconds.

func (*PrometheusRequest) LogToSpan

func (r *PrometheusRequest) LogToSpan(sp opentracing.Span)

LogToSpan writes information about this request to an OpenTracing span

func (*PrometheusRequest) WithQuery

func (r *PrometheusRequest) WithQuery(query string) tripperware.Request

WithQuery clone the current request with a different query.

func (*PrometheusRequest) WithStartEnd

func (r *PrometheusRequest) WithStartEnd(int64, int64) tripperware.Request

WithStartEnd clone the current request with different start and end timestamp.

func (*PrometheusRequest) WithStats

func (r *PrometheusRequest) WithStats(stats string) tripperware.Request

WithStats clones the current `PrometheusRequest` with a new stats.

type Sample

type Sample struct {
	Labels []github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" json:"metric"`
	Sample cortexpb.Sample                                             `protobuf:"bytes,2,opt,name=sample,proto3" json:"value"`
}

func (*Sample) Descriptor

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

func (*Sample) Equal

func (this *Sample) Equal(that interface{}) bool

func (*Sample) GetSample

func (m *Sample) GetSample() cortexpb.Sample

func (*Sample) GoString

func (this *Sample) GoString() string

func (*Sample) Marshal

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

func (*Sample) MarshalJSON

func (s *Sample) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Sample) MarshalTo

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

func (*Sample) MarshalToSizedBuffer

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

func (*Sample) ProtoMessage

func (*Sample) ProtoMessage()

func (*Sample) Reset

func (m *Sample) Reset()

func (*Sample) Size

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

func (*Sample) String

func (this *Sample) String() string

func (*Sample) Unmarshal

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

func (*Sample) UnmarshalJSON

func (s *Sample) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Sample) XXX_DiscardUnknown

func (m *Sample) XXX_DiscardUnknown()

func (*Sample) XXX_Marshal

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

func (*Sample) XXX_Merge

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

func (*Sample) XXX_Size

func (m *Sample) XXX_Size() int

func (*Sample) XXX_Unmarshal

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

type Vector

type Vector struct {
	Samples []*Sample `protobuf:"bytes,1,rep,name=samples,proto3" json:"samples,omitempty"`
}

func (*Vector) Descriptor

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

func (*Vector) Equal

func (this *Vector) Equal(that interface{}) bool

func (*Vector) GetSamples

func (m *Vector) GetSamples() []*Sample

func (*Vector) GoString

func (this *Vector) GoString() string

func (*Vector) Marshal

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

func (*Vector) MarshalTo

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

func (*Vector) MarshalToSizedBuffer

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

func (*Vector) ProtoMessage

func (*Vector) ProtoMessage()

func (*Vector) Reset

func (m *Vector) Reset()

func (*Vector) Size

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

func (*Vector) String

func (this *Vector) String() string

func (*Vector) Unmarshal

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

func (*Vector) XXX_DiscardUnknown

func (m *Vector) XXX_DiscardUnknown()

func (*Vector) XXX_Marshal

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

func (*Vector) XXX_Merge

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

func (*Vector) XXX_Size

func (m *Vector) XXX_Size() int

func (*Vector) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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