logging

package
v1.152.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFirstRunningPodWithLabels

func GetFirstRunningPodWithLabels(ctx context.Context, labelsMap labels.Selector, namespace string, client kubernetes.Interface) (*corev1.Pod, error)

GetFirstRunningPodWithLabels fetches the first running pod with the desired set of labels <labelsMap>

func GetLogCountFromSearchResponse

func GetLogCountFromSearchResponse(search *SearchResponse) int

GetLogCountFromSearchResponse extracts the log count from the search response.

func GetPodsByLabels

func GetPodsByLabels(ctx context.Context, labelsSelector labels.Selector, c kubernetes.Interface, namespace string) (*corev1.PodList, error)

GetPodsByLabels fetches all pods with the desired set of labels <labelsMap>

func PodExecByLabel

func PodExecByLabel(ctx context.Context, client kubernetes.Interface, namespace string, podLabels labels.Selector, podContainer string, command ...string) (io.Reader, io.Reader, error)

PodExecByLabel executes a command inside pods filtered by label

Types

type SearchResponse

type SearchResponse struct {
	Data struct {
		Result []struct {
			Values []any `json:"values"`
		} `json:"result"`
	} `json:"data"`
}

SearchResponse represents the response from a search query to vali

func GetValiLogs

func GetValiLogs(ctx context.Context, valiLabels map[string]string, valiNamespace, key, value string, client kubernetes.Interface) (*SearchResponse, error)

GetValiLogs gets logs from the last 1 hour for <key>, <value> from the vali instance in <valiNamespace>

Jump to

Keyboard shortcuts

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