logs

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package logs contains code to fetch logs from Kubernetes pods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodLogs

func GetPodLogs(ctx context.Context, pod corev1.Pod, getPrevious bool, writer io.Writer, requestedLineLength int) (
	[]string, error,
)

GetPodLogs streams the pod logs and shunts them to the `writer`, as well as returning the last `requestedLineLength` of lines of logs in a slice. If `getPrevious` was activated, it will get the previous logs

func StreamPodLogs

func StreamPodLogs(ctx context.Context, pod corev1.Pod, getPrevious bool, writer io.Writer) (err error)

StreamPodLogs streams the pod logs and shunts them to the `writer`. If `getPrevious` was activated, it will get the previous logs

Types

This section is empty.

Jump to

Keyboard shortcuts

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