lokilog

package
v1.21.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const LokiExportDir = "lokiExport"

Variables

This section is empty.

Functions

This section is empty.

Types

type LogHandler

type LogHandler struct {
	base.BaseHandler
}

func (*LogHandler) Context

func (l *LogHandler) Context(c *gin.Context)

Context 获取loki上下文 @Tags Log @Summary 获取loki上下文 @Description 获取loki上下文 @Accept json @Produce json @Param cluster_name path string true "cluster_name" @Param query query string true "query" @Param step query string false "step" @Param interval query string false "interval" @Param direction query string false "direction" @Param limit query int false "limit" @Param start query string false "start" @Param end query string false "end" @Success 200 {object} handlers.ResponseStruct{Data=string} "Context" @Router /v1/log/{cluster_name}/context [get] @Security JWT

func (*LogHandler) Export

func (l *LogHandler) Export(c *gin.Context)

Export 导出loki查询结果 @Tags Log @Summary 导出loki查询结果 @Description 导出loki查询结果 @Accept json @Produce json @Param cluster_name path string true "cluster_name" @Param query query string true "query" @Param interval query string false "interval" @Param direction query string false "direction" @Param limit query int false "limit" @Param start query string false "start" @Param end query string false "end" @Success 200 {object} handlers.ResponseStruct{Data=string} "Export" @Router /v1/log/{cluster_name}/export [get] @Security JWT

func (*LogHandler) LabelValues

func (l *LogHandler) LabelValues(c *gin.Context)

LabelValues 获取loki指定标签值 @Tags Log @Summary 获取loki指定标签值 @Description 获取loki指定标签值 @Accept json @Produce json @Param cluster_name path string true "cluster_name" @Param label path string true "label" @Param start query string false "start" @Param end query string false "end" @Success 200 {object} handlers.ResponseStruct{Data=string} "LabelValues" @Router /v1/log/{cluster_name}/label/{label}/values [get] @Security JWT

func (*LogHandler) Labels

func (l *LogHandler) Labels(c *gin.Context)

Labels 获取loki标签 @Tags Log @Summary 获取loki标签 @Description 获取loki标签 @Accept json @Produce json @Param cluster_name path string true "cluster_name" @Param start query string false "start" @Param end query string false "end" @Success 200 {object} handlers.ResponseStruct{Data=string} "Labels" @Router /v1/log/{cluster_name}/labels [get] @Security JWT

func (*LogHandler) QueryLanguage

func (l *LogHandler) QueryLanguage(c *gin.Context)

QueryLanguage 获取loki查询语句 @Tags Log @Summary 获取loki查询语句 @Description 获取loki查询语句 @Accept json @Produce json @Param cluster_name path string true "cluster_name" @Param filters[] query array false "filters[]" @Param pod query string false "pod" @Param start query string false "start" @Param end query string false "end" @Success 200 {object} handlers.ResponseStruct{Data=string} "QueryLanguage" @Router /v1/log/{cluster_name}/querylanguage [get] @Security JWT

func (*LogHandler) QueryRange

func (l *LogHandler) QueryRange(c *gin.Context)

QueryRange 获取loki查询结果 @Tags Log @Summary 获取loki查询结果 @Description 获取loki查询结果 @Accept json @Produce json @Param cluster_name path string true "cluster_name" @Param filters[] query array false "filters[]" @Param query query string true "query" @Param level query string false "level" @Param step query string false "step" @Param pod query string false "pod" @Param interval query string false "interval" @Param direction query string false "direction" @Param limit query int false "limit" @Param start query string false "start" @Param end query string false "end" @Success 200 {object} handlers.ResponseStruct{Data=string} "QueryRange" @Router /v1/log/{cluster_name}/queryrange [get] @Security JWT

func (*LogHandler) RegistRouter

func (h *LogHandler) RegistRouter(rg *gin.RouterGroup)

func (*LogHandler) Series

func (l *LogHandler) Series(c *gin.Context)

LabelValues 获取loki Series @Tags Log @Summary 获取loki Series @Description 获取loki Series @Accept json @Produce json @Param cluster_name path string true "cluster_name" @Param match query string true "match" @Param start query string false "start" @Param end query string false "end" @Success 200 {object} handlers.ResponseStruct{Data=string} "Series data" @Router /v1/log/{cluster_name}/series [get] @Security JWT

type LokiCli

type LokiCli = LogHandler

func (LokiCli) LokiLabelValues

func (c LokiCli) LokiLabelValues(ctx context.Context, cluster string, label string, query map[string]string) ([]string, error)

func (LokiCli) LokiLabels

func (c LokiCli) LokiLabels(ctx context.Context, cluster string, query map[string]string) ([]string, error)

func (LokiCli) LokiQuery

func (c LokiCli) LokiQuery(ctx context.Context, cluster string, query map[string]string) (*loki.QueryResponseData, error)

func (LokiCli) LokiQueryRange

func (c LokiCli) LokiQueryRange(ctx context.Context, cluster string, query map[string]string) (*loki.QueryResponseData, error)

func (LokiCli) LokiSeries

func (c LokiCli) LokiSeries(ctx context.Context, cluster string, query map[string]string) (interface{}, error)

Jump to

Keyboard shortcuts

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