logging

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoggingService

func NewLoggingService(client clusterClient) *loggingService

NewLoggingService creates a new logging service.

Types

type LokiResponse

type LokiResponse struct {
	Status string           `json:"status"`
	Data   LokiResponseData `json:"data"`
}

LokiResponse represents the root structure of a query response.

type LokiResponseData

type LokiResponseData struct {
	// ResultType contains the type of the response data. May be one "stream", "matrix", "vector".
	ResultType string             `json:"resultType"`
	Result     []LokiStreamResult `json:"result"`
}

LokiResponseData contains log stream results and metadata ResultType. ResultType could be "stream" oder "vector".

type LokiStream

type LokiStream struct {
	Container string `json:"container"`
	Filename  string `json:"filename"`
	Job       string `json:"job"`
	Namespace string `json:"namespace"`
	NodeName  string `json:"node_name"`
	Pod       string `json:"pod"`
	Stream    string `json:"stream"`
	App       string `json:"app"`
}

LokiStream contains label metadata for the stream result.

type LokiStreamResult

type LokiStreamResult struct {
	Stream LokiStream `json:"stream"`
	// Values contains the logs as slices of which the first field consists of
	// a timestamp as epoch second and the second the log line as JSON
	Values [][]string `json:"values"`
}

LokiStreamResult the stream and the log values.

Jump to

Keyboard shortcuts

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