Documentation
¶
Index ¶
- func GetFirstRunningPodWithLabels(ctx context.Context, labelsMap labels.Selector, namespace string, ...) (*corev1.Pod, error)
- func GetLogCountFromSearchResponse(search *SearchResponse) int
- func GetPodsByLabels(ctx context.Context, labelsSelector labels.Selector, c kubernetes.Interface, ...) (*corev1.PodList, error)
- func PodExecByLabel(ctx context.Context, client kubernetes.Interface, namespace string, ...) (io.Reader, io.Reader, error)
- type SearchResponse
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.
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>
Click to show internal directories.
Click to hide internal directories.