log

package
v0.0.0-...-37f5ccb Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// LogBufferSize number of log messages that may be buffered
	LogBufferSize = 500 * 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sAPIRequestor

type K8sAPIRequestor struct {
	// contains filtered or unexported fields
}

K8sAPIRequestor implements the Requestor interface for k8s

func (*K8sAPIRequestor) Query

func (k *K8sAPIRequestor) Query(ctx context.Context,
	r types.LogRequest) (<-chan types.Message, error)

type LokiAPIRequestor

type LokiAPIRequestor struct {
	// contains filtered or unexported fields
}

func (*LokiAPIRequestor) Query

func (l *LokiAPIRequestor) Query(ctx context.Context, r types.LogRequest) (<-chan types.Message, error)

type RangeQueryResponse

type RangeQueryResponse struct {
	Data struct {
		Result []struct {
			Stream struct {
				Cluster   string `json:"cluster,omitempty"`
				Container string `json:"container,omitempty"`
				Namespace string `json:"namespace,omitempty"`
				Pod       string `json:"pod,omitempty"`
				Job       string `json:"job,omitempty"`
			}
			Values [][]string `json:"values,omitempty"`
		}
		ResultType string `json:"resultType,omitempty"`
	}
	Status string `json:"status,omitempty"`
}

type Requester

type Requester interface {
	// Query submits a log request to the actual logging system.
	Query(ctx context.Context, req types.LogRequest) (<-chan types.Message, error)
}

Requester submits queries the logging system.

func NewK8sAPIRequestor

func NewK8sAPIRequestor(client kubernetes.Interface) Requester

func NewLokiAPIRequestor

func NewLokiAPIRequestor(url, user, token string) Requester

Jump to

Keyboard shortcuts

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