Documentation
¶
Index ¶
- Variables
- func NewLogFilterTripperware(cfg Config, log log.Logger, limits queryrange.Limits, codec queryrange.Codec) (frontend.Tripperware, error)
- func SplitByIntervalMiddleware(interval time.Duration, limits queryrange.Limits, merger queryrange.Merger) queryrange.Middleware
- type Config
- type LokiData
- func (*LokiData) Descriptor() ([]byte, []int)
- func (this *LokiData) Equal(that interface{}) bool
- func (m *LokiData) GetResult() []logproto.Stream
- func (m *LokiData) GetResultType() string
- func (this *LokiData) GoString() string
- func (m *LokiData) Marshal() (dAtA []byte, err error)
- func (m *LokiData) MarshalTo(dAtA []byte) (int, error)
- func (m *LokiData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LokiData) ProtoMessage()
- func (m *LokiData) Reset()
- func (m *LokiData) Size() (n int)
- func (this *LokiData) String() string
- func (m *LokiData) Unmarshal(dAtA []byte) error
- func (m *LokiData) XXX_DiscardUnknown()
- func (m *LokiData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiData) XXX_Merge(src proto.Message)
- func (m *LokiData) XXX_Size() int
- func (m *LokiData) XXX_Unmarshal(b []byte) error
- type LokiRequest
- func (*LokiRequest) Descriptor() ([]byte, []int)
- func (this *LokiRequest) Equal(that interface{}) bool
- func (m *LokiRequest) GetDirection() logproto.Direction
- func (r *LokiRequest) GetEnd() int64
- func (m *LokiRequest) GetEndTs() time.Time
- func (m *LokiRequest) GetLimit() uint32
- func (m *LokiRequest) GetPath() string
- func (m *LokiRequest) GetQuery() string
- func (r *LokiRequest) GetStart() int64
- func (m *LokiRequest) GetStartTs() time.Time
- func (m *LokiRequest) GetStep() int64
- func (this *LokiRequest) GoString() string
- func (m *LokiRequest) Marshal() (dAtA []byte, err error)
- func (m *LokiRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *LokiRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LokiRequest) ProtoMessage()
- func (m *LokiRequest) Reset()
- func (m *LokiRequest) Size() (n int)
- func (this *LokiRequest) String() string
- func (m *LokiRequest) Unmarshal(dAtA []byte) error
- func (r *LokiRequest) WithStartEnd(s int64, e int64) queryrange.Request
- func (m *LokiRequest) XXX_DiscardUnknown()
- func (m *LokiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiRequest) XXX_Merge(src proto.Message)
- func (m *LokiRequest) XXX_Size() int
- func (m *LokiRequest) XXX_Unmarshal(b []byte) error
- type LokiResponse
- func (res LokiResponse) Count() int64
- func (*LokiResponse) Descriptor() ([]byte, []int)
- func (this *LokiResponse) Equal(that interface{}) bool
- func (m *LokiResponse) GetData() LokiData
- func (m *LokiResponse) GetDirection() logproto.Direction
- func (m *LokiResponse) GetError() string
- func (m *LokiResponse) GetErrorType() string
- func (m *LokiResponse) GetLimit() uint32
- func (m *LokiResponse) GetStatus() string
- func (m *LokiResponse) GetVersion() uint32
- func (this *LokiResponse) GoString() string
- func (m *LokiResponse) Marshal() (dAtA []byte, err error)
- func (m *LokiResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *LokiResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LokiResponse) ProtoMessage()
- func (m *LokiResponse) Reset()
- func (m *LokiResponse) Size() (n int)
- func (this *LokiResponse) String() string
- func (m *LokiResponse) Unmarshal(dAtA []byte) error
- func (m *LokiResponse) XXX_DiscardUnknown()
- func (m *LokiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LokiResponse) XXX_Merge(src proto.Message)
- func (m *LokiResponse) XXX_Size() int
- func (m *LokiResponse) XXX_Unmarshal(b []byte) error
- type Stopper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthQueryrange = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQueryrange = fmt.Errorf("proto: integer overflow") )
Functions ¶
func NewLogFilterTripperware ¶
func NewLogFilterTripperware( cfg Config, log log.Logger, limits queryrange.Limits, codec queryrange.Codec, ) (frontend.Tripperware, error)
NewLogFilterTripperware creates a new frontend tripperware responsible for handling log requests with regex.
func SplitByIntervalMiddleware ¶
func SplitByIntervalMiddleware(interval time.Duration, limits queryrange.Limits, merger queryrange.Merger) queryrange.Middleware
SplitByIntervalMiddleware creates a new Middleware that splits log requests by a given interval.
Types ¶
type Config ¶
type Config struct {
queryrange.Config `yaml:",inline"`
}
Config is the configuration for the queryrange tripperware
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to configure this flag set.
type LokiData ¶
type LokiData struct { ResultType string `protobuf:"bytes,1,opt,name=ResultType,json=resultType,proto3" json:"resultType"` Result []logproto.Stream `protobuf:"bytes,2,rep,name=Result,json=result,proto3" json:"result"` }
func (*LokiData) Descriptor ¶
func (*LokiData) GetResultType ¶
func (*LokiData) MarshalToSizedBuffer ¶
func (*LokiData) ProtoMessage ¶
func (*LokiData) ProtoMessage()
func (*LokiData) XXX_DiscardUnknown ¶
func (m *LokiData) XXX_DiscardUnknown()
func (*LokiData) XXX_Marshal ¶
func (*LokiData) XXX_Unmarshal ¶
type LokiRequest ¶
type LokiRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Step int64 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` StartTs time.Time `protobuf:"bytes,4,opt,name=startTs,proto3,stdtime" json:"startTs"` EndTs time.Time `protobuf:"bytes,5,opt,name=endTs,proto3,stdtime" json:"endTs"` Direction logproto.Direction `protobuf:"varint,6,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` Path string `protobuf:"bytes,7,opt,name=path,proto3" json:"path,omitempty"` }
func (*LokiRequest) Descriptor ¶
func (*LokiRequest) Descriptor() ([]byte, []int)
func (*LokiRequest) Equal ¶
func (this *LokiRequest) Equal(that interface{}) bool
func (*LokiRequest) GetDirection ¶
func (m *LokiRequest) GetDirection() logproto.Direction
func (*LokiRequest) GetEnd ¶
func (r *LokiRequest) GetEnd() int64
func (*LokiRequest) GetEndTs ¶
func (m *LokiRequest) GetEndTs() time.Time
func (*LokiRequest) GetLimit ¶
func (m *LokiRequest) GetLimit() uint32
func (*LokiRequest) GetPath ¶
func (m *LokiRequest) GetPath() string
func (*LokiRequest) GetQuery ¶
func (m *LokiRequest) GetQuery() string
func (*LokiRequest) GetStart ¶
func (r *LokiRequest) GetStart() int64
func (*LokiRequest) GetStartTs ¶
func (m *LokiRequest) GetStartTs() time.Time
func (*LokiRequest) GetStep ¶
func (m *LokiRequest) GetStep() int64
func (*LokiRequest) GoString ¶
func (this *LokiRequest) GoString() string
func (*LokiRequest) Marshal ¶
func (m *LokiRequest) Marshal() (dAtA []byte, err error)
func (*LokiRequest) MarshalToSizedBuffer ¶
func (m *LokiRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LokiRequest) ProtoMessage ¶
func (*LokiRequest) ProtoMessage()
func (*LokiRequest) Reset ¶
func (m *LokiRequest) Reset()
func (*LokiRequest) Size ¶
func (m *LokiRequest) Size() (n int)
func (*LokiRequest) String ¶
func (this *LokiRequest) String() string
func (*LokiRequest) Unmarshal ¶
func (m *LokiRequest) Unmarshal(dAtA []byte) error
func (*LokiRequest) WithStartEnd ¶
func (r *LokiRequest) WithStartEnd(s int64, e int64) queryrange.Request
func (*LokiRequest) XXX_DiscardUnknown ¶
func (m *LokiRequest) XXX_DiscardUnknown()
func (*LokiRequest) XXX_Marshal ¶
func (m *LokiRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiRequest) XXX_Merge ¶
func (m *LokiRequest) XXX_Merge(src proto.Message)
func (*LokiRequest) XXX_Size ¶
func (m *LokiRequest) XXX_Size() int
func (*LokiRequest) XXX_Unmarshal ¶
func (m *LokiRequest) XXX_Unmarshal(b []byte) error
type LokiResponse ¶
type LokiResponse struct { Status string `protobuf:"bytes,1,opt,name=Status,json=status,proto3" json:"status"` Data LokiData `protobuf:"bytes,2,opt,name=Data,json=data,proto3" json:"data,omitempty"` ErrorType string `protobuf:"bytes,3,opt,name=ErrorType,json=errorType,proto3" json:"errorType,omitempty"` Error string `protobuf:"bytes,4,opt,name=Error,json=error,proto3" json:"error,omitempty"` Direction logproto.Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` Limit uint32 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"` Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` }
func (LokiResponse) Count ¶
func (res LokiResponse) Count() int64
func (*LokiResponse) Descriptor ¶
func (*LokiResponse) Descriptor() ([]byte, []int)
func (*LokiResponse) Equal ¶
func (this *LokiResponse) Equal(that interface{}) bool
func (*LokiResponse) GetData ¶
func (m *LokiResponse) GetData() LokiData
func (*LokiResponse) GetDirection ¶
func (m *LokiResponse) GetDirection() logproto.Direction
func (*LokiResponse) GetError ¶
func (m *LokiResponse) GetError() string
func (*LokiResponse) GetErrorType ¶
func (m *LokiResponse) GetErrorType() string
func (*LokiResponse) GetLimit ¶
func (m *LokiResponse) GetLimit() uint32
func (*LokiResponse) GetStatus ¶
func (m *LokiResponse) GetStatus() string
func (*LokiResponse) GetVersion ¶
func (m *LokiResponse) GetVersion() uint32
func (*LokiResponse) GoString ¶
func (this *LokiResponse) GoString() string
func (*LokiResponse) Marshal ¶
func (m *LokiResponse) Marshal() (dAtA []byte, err error)
func (*LokiResponse) MarshalToSizedBuffer ¶
func (m *LokiResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LokiResponse) ProtoMessage ¶
func (*LokiResponse) ProtoMessage()
func (*LokiResponse) Reset ¶
func (m *LokiResponse) Reset()
func (*LokiResponse) Size ¶
func (m *LokiResponse) Size() (n int)
func (*LokiResponse) String ¶
func (this *LokiResponse) String() string
func (*LokiResponse) Unmarshal ¶
func (m *LokiResponse) Unmarshal(dAtA []byte) error
func (*LokiResponse) XXX_DiscardUnknown ¶
func (m *LokiResponse) XXX_DiscardUnknown()
func (*LokiResponse) XXX_Marshal ¶
func (m *LokiResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LokiResponse) XXX_Merge ¶
func (m *LokiResponse) XXX_Merge(src proto.Message)
func (*LokiResponse) XXX_Size ¶
func (m *LokiResponse) XXX_Size() int
func (*LokiResponse) XXX_Unmarshal ¶
func (m *LokiResponse) XXX_Unmarshal(b []byte) error
type Stopper ¶
type Stopper interface {
Stop() error
}
Stopper gracefully shutdown resources created
func NewTripperware ¶
func NewTripperware(cfg Config, log log.Logger, limits queryrange.Limits) (frontend.Tripperware, Stopper, error)
NewTripperware returns a Tripperware configured with middlewares to align, split and cache requests.
Click to show internal directories.
Click to hide internal directories.