Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKubeClientFromKubeConfig ¶
func CreateKubeClientFromKubeConfig(kubeConfigPath string) (kubernetes.Interface, error)
CreateKubeClientFromKubeConfig creates a kubernetes client from the kubeconfig file at the given path.
func FollowLogs ¶
func FollowLogs( ctx context.Context, client kubernetes.Interface, params *FollowLogsParams, ) error
FollowLogs follows the logs of the pods that match the selector.
Types ¶
type FollowLogsParams ¶
type FollowLogsParams struct { // Namespace is the namespace of the pods. Namespace string // Selector is the selector of the pods. Selector labels.Selector // Container is the container name of the pods. Container string // MaxConcurrency is the maximum number of concurrent log streams to follow. MaxConcurrency int // AddPrefix specifies whether to add the prefix of the pod name to the logs. AddPrefix bool // Output is the writer to write the logs to. Output io.Writer }
FollowLogsParams is the parameters for following logs.
type KubeClientFactory ¶
type KubeClientFactory func(kubeConfigPath string) (kubernetes.Interface, error)
KubeClientFactory is a function that creates a kubernetes client from the kubeconfig file at the given path.
Click to show internal directories.
Click to hide internal directories.