Documentation ¶
Overview ¶
Package lokihandler provides Loki API implementation.
Index ¶
- type LokiAPI
- func (h *LokiAPI) IndexStats(context.Context, lokiapi.IndexStatsParams) (*lokiapi.IndexStats, error)
- func (h *LokiAPI) LabelValues(ctx context.Context, params lokiapi.LabelValuesParams) (*lokiapi.Values, error)
- func (h *LokiAPI) Labels(ctx context.Context, params lokiapi.LabelsParams) (*lokiapi.Labels, error)
- func (h *LokiAPI) NewError(_ context.Context, err error) *lokiapi.ErrorStatusCode
- func (h *LokiAPI) Push(context.Context, lokiapi.PushReq) error
- func (h *LokiAPI) Query(ctx context.Context, params lokiapi.QueryParams) (*lokiapi.QueryResponse, error)
- func (h *LokiAPI) QueryRange(ctx context.Context, params lokiapi.QueryRangeParams) (*lokiapi.QueryResponse, error)
- func (h *LokiAPI) Series(ctx context.Context, params lokiapi.SeriesParams) (*lokiapi.Maps, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LokiAPI ¶
type LokiAPI struct {
// contains filtered or unexported fields
}
LokiAPI implements lokiapi.Handler.
func NewLokiAPI ¶
func NewLokiAPI(q logstorage.Querier, engine *logqlengine.Engine) *LokiAPI
NewLokiAPI creates new LokiAPI.
func (*LokiAPI) IndexStats ¶ added in v0.1.0
func (h *LokiAPI) IndexStats(context.Context, lokiapi.IndexStatsParams) (*lokiapi.IndexStats, error)
IndexStats implements indexStats operation.
Get index stats.
GET /loki/api/v1/index/stats
func (*LokiAPI) LabelValues ¶
func (h *LokiAPI) LabelValues(ctx context.Context, params lokiapi.LabelValuesParams) (*lokiapi.Values, error)
LabelValues implements labelValues operation. Get values of label.
GET /loki/api/v1/label/{name}/values
func (*LokiAPI) Labels ¶
Labels implements labels operation.
Get labels. Used by Grafana to test connection to Loki.
GET /loki/api/v1/labels
func (*LokiAPI) NewError ¶
NewError creates *ErrorStatusCode from error returned by handler.
Used for common default response.
func (*LokiAPI) Query ¶
func (h *LokiAPI) Query(ctx context.Context, params lokiapi.QueryParams) (*lokiapi.QueryResponse, error)
Query implements query operation.
Query.
GET /loki/api/v1/query
func (*LokiAPI) QueryRange ¶
func (h *LokiAPI) QueryRange(ctx context.Context, params lokiapi.QueryRangeParams) (*lokiapi.QueryResponse, error)
QueryRange implements queryRange operation.
Query range.
GET /loki/api/v1/query_range