letheql

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Label

type Label struct {
	Key   string
	Value string
}

func ParseLabels

func ParseLabels(labelsString string) ([]Label, error)

type Leaf

type Leaf struct {
	LeafType     LeafType
	LogRequest   LogRequest
	ScalarResult float64
	LogsResult   []string
	Function     string
	TimeRange    TimeRange
	Keywords     []string
}

type LeafType

type LeafType string
const (
	LeafTypeAuditLogRequest LeafType = "AuditLogRequest"
	LeafTypeEventLogRequest LeafType = "EventLogRequest"
	LeafTypeNodeLogRequest  LeafType = "NodeLogRequest"
	LeafTypePodLogRequest   LeafType = "PodLogRequest"
)
const (
	LeafTypeScalarResult LeafType = "ScalarResult"
	LeafTypeLogsResult   LeafType = "LogsResult"
)

type LogRequest

type LogRequest struct {
	// AuditSearchParams file.AuditSearchParams
	EventSearchParams file.EventSearchParams
	NodeSearchParams  file.NodeSearchParams
	PodSearchParams   file.PodSearchParams
	DurationSeconds   int
	Function          string
}

type ParsedQuery

type ParsedQuery struct {
	Type    string
	Labels  []Label
	Keyword string
}

func ParseQuery

func ParseQuery(queryString string) (ParsedQuery, error)

type QueryData

type QueryData struct {
	ResultType ValueType `json:"resultType"`
	Logs       []string  `json:"logs,omitempty"`
	Scalar     float64   `json:"scalar,omitempty"`
}

func ProcQuery

func ProcQuery(query string, timeRange TimeRange) (QueryData, error)

type TimeRange

type TimeRange struct {
	Start time.Time
	End   time.Time
}

type ValueType

type ValueType string
const (
	ValueTypeScalar ValueType = "scalar"
	ValueTypeLogs   ValueType = "logs"
)

Jump to

Keyboard shortcuts

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