Documentation ¶
Index ¶
- Constants
- func Exist(eles []interface{}, ele interface{}) bool
- func FileExists(path string) bool
- func GenerateLevelRegex(level string) string
- func GetExpr(label string, value string) string
- func GetLogLevelExpr(level string) string
- func GetShellColor(colorNo string) string
- func InitSplitDateTime(limit int) map[string][]int
- func LogLevel(message string) string
- func RegexHighlightShow(message string, filter string) string
- func ShellHighlightShow(message string) string
- func SplitDateTime(start string, end string, limit int) ([]int, int)
- func TimeInPart(splitDateTime []int, timestamp string, step int) int
- type Info
- type LabelParam
- type LabelResponse
- type LokiMessage
- type LokiMessages
- type LokiPromeRuleResp
- type Matrix
- type QueryRangeParam
- type QueryResponse
- type QueryResponseData
- type QueryResult
- type SampleStream
- type SeriesForm
- type SeriesResponse
- type Stream
- type Streams
- type TailParam
Constants ¶
View Source
const ( ResultTypeVector = "vector" ResultTypeMatrix = "matrix" )
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func GenerateLevelRegex ¶
func GetLogLevelExpr ¶
func GetShellColor ¶
func InitSplitDateTime ¶
func RegexHighlightShow ¶
func ShellHighlightShow ¶
Types ¶
type LabelParam ¶
type LabelParam struct { Start string `form:"start" json:"start,omitempty"` End string `form:"end" json:"end,omitempty"` Label string `form:"label" json:"label,omitempty"` }
func (*LabelParam) ToMap ¶
func (l *LabelParam) ToMap() map[string]string
type LabelResponse ¶
type LokiMessage ¶
type LokiMessages ¶
type LokiMessages []LokiMessage
func (LokiMessages) Len ¶
func (msg LokiMessages) Len() int
func (LokiMessages) Less ¶
func (msg LokiMessages) Less(i, j int) bool
func (LokiMessages) Swap ¶
func (msg LokiMessages) Swap(i, j int)
type LokiPromeRuleResp ¶
type Matrix ¶
type Matrix []SampleStream
type QueryRangeParam ¶
type QueryRangeParam struct { Start string `form:"start" json:"start,omitempty"` End string `form:"end" json:"end,omitempty"` Step string `form:"step" json:"step,omitempty"` Interval string `form:"interval" json:"interval,omitempty"` Query string `form:"query" json:"query,omitempty"` Direction string `form:"direction" json:"direction,omitempty"` Limit string `form:"limit" json:"limit,omitempty"` }
func (*QueryRangeParam) ToMap ¶
func (q *QueryRangeParam) ToMap() map[string]string
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
type QueryResponseData ¶
type QueryResponseData struct { ResultType string `json:"resultType"` Result []interface{} `json:"result"` }
type QueryResult ¶
type SampleStream ¶
type SampleStream struct { Metric map[string]string `json:"metric"` Values [][]interface{} `json:"values"` }
func (*SampleStream) ToStruct ¶
func (q *SampleStream) ToStruct(m map[string]interface{}) SampleStream
type SeriesForm ¶
type SeriesForm struct { Match string `form:"match" json:"match,omitempty"` End string `form:"end" json:"end,omitempty"` Start string `form:"start" json:"start,omitempty"` Label string `form:"label" json:"label,omitempty"` }
func (*SeriesForm) ToMap ¶
func (l *SeriesForm) ToMap() map[string]string
type SeriesResponse ¶
type SeriesResponse struct { Status string `json:"status"` Data interface{} `json:"data,omitempty"` }
type TailParam ¶
type TailParam struct { Start string `form:"start" json:"start,omitempty" header:"start"` Query string `form:"query" json:"query,omitempty" header:"query"` Limit string `form:"limit" json:"limit,omitempty" header:"limit"` Delay_For string `form:"delay_for" json:"delay_for,omitempty" header:"delay_for"` Level string `form:"level" json:"level,omitempty" header:"level"` Filter string `form:"filter" json:"filter,omitempty" header:"filter"` }
Click to show internal directories.
Click to hide internal directories.