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 FileExists(path string) bool
func GenerateLevelRegex ¶
func GenerateLevelRegex(level string) string
func GetLogLevelExpr ¶
func GetLogLevelExpr(level string) string
func GetShellColor ¶
func GetShellColor(colorNo string) string
func InitSplitDateTime ¶
func InitSplitDateTime(limit int) map[string][]int
func RegexHighlightShow ¶
func RegexHighlightShow(message string, filter string) string
func ShellHighlightShow ¶
func ShellHighlightShow(message string) string
func SplitDateTime ¶
func SplitDateTime(start string, end string, limit int) ([]int, int)
func TimeInPart ¶
func TimeInPart(splitDateTime []int, timestamp string, step int) int
Types ¶
type Info ¶
type Info struct {
Animation string `json:"animation"`
Level string `json:"level"`
Message string `json:"message"`
Timestamp string `json:"timestamp"`
Timestampstr string `json:"timestampstr"`
Index string `json:"index"`
}
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"`
}
type LabelResponse ¶
type LabelResponse struct {
Status string `json:"status"`
Data []string `json:"data,omitempty"`
}
type LokiMessage ¶
type LokiMessage struct {
Timestamp string
Message string
}
type LokiMessages ¶
type LokiMessages []LokiMessage
type LokiPromeRuleResp ¶
type LokiPromeRuleResp struct {
Status string `json:"status"`
Data v1.RulesResult `json:"data"`
ErrorType v1.ErrorType `json:"errorType"`
Error string `json:"error"`
Warnings []string `json:"warnings,omitempty"`
}
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"`
}
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 QueryResult struct {
Info Info `json:"info"`
Stream map[string]string `json:"stream"`
}
type SampleStream ¶
type SampleStream struct {
Metric map[string]string `json:"metric"`
Values [][]interface{} `json:"values"`
}
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"`
}
type SeriesResponse ¶
type SeriesResponse struct {
Status string `json:"status"`
Data interface{} `json:"data,omitempty"`
}
type Stream ¶
type Stream struct {
Labels map[string]string `json:"stream"`
Entries [][]string `json:"values"`
}
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.