Documentation
¶
Index ¶
Constants ¶
const ( QueryStatusSuccess = "success" QueryStatusFail = "fail" )
QueryStatus values
const ( ResultTypeStream = "streams" ResultTypeScalar = "scalar" ResultTypeVector = "vector" ResultTypeMatrix = "matrix" )
ResultType values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
Entry represents a log entry. It includes a log message and the time it occurred at.
func (*Entry) UnmarshalJSON ¶
type EntryEncoder ¶
type EntryEncoder struct{}
type InstantQuery ¶
InstantQuery defines a log instant query.
type LabelResponse ¶
LabelResponse represents the http json response to a label query
type LabelSet ¶
LabelSet is a key/value pair mapping of labels
func (LabelSet) Map ¶
Map coerces LabelSet into a map[string]string. This is useful for working with adapter types.
func (LabelSet) String ¶
String implements the Stringer interface. It returns a formatted/sorted set of label key/value pairs.
func (*LabelSet) UnmarshalJSON ¶
type PushRequest ¶
type PushRequest struct {
Streams []*Stream `json:"streams"`
}
PushRequest models a log stream push
type QueryResponse ¶
type QueryResponse struct {
Status string `json:"status"`
Data QueryResponseData `json:"data"`
}
QueryResponse represents the http json response to a Loki range and instant query
func (*QueryResponse) UnmarshalJSON ¶
func (q *QueryResponse) UnmarshalJSON(data []byte) error
type QueryResponseData ¶
type QueryResponseData struct {
ResultType ResultType `json:"resultType"`
Result ResultValue `json:"result"`
}
QueryResponseData represents the http json response to a label query
func (*QueryResponseData) UnmarshalJSON ¶
func (q *QueryResponseData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type RangeQuery ¶
type RangeQuery struct {
Start time.Time
End time.Time
Step time.Duration
Interval time.Duration
Query string
Direction int32
Limit uint32
Shards []string
}
RangeQuery defines a log range query.
type ResultValue ¶
type ResultValue interface {
Type() ResultType
}
ResultValue interface mimics the promql.Value interface
type Scalar ¶
Scalar is a single timestamp/float with no labels
func (Scalar) MarshalJSON ¶
func (*Scalar) UnmarshalJSON ¶
type Stream ¶
Stream represents a log stream. It includes a set of log entries and their labels.