kubernetes

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

kubernetes package provides access to log collections on k8s

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientset

func GetClientset() (*kubernetes.Clientset, *rest.Config, error)

func GetClusters

func GetClusters() ([]string, error)

Types

type K8SWriter

type K8SWriter struct {
	Output cli.OutputHandler
	Buff   *bytes.Buffer
}

func (*K8SWriter) Write

func (w *K8SWriter) Write(p []byte) (n int, err error)

type KubeArgs

type KubeArgs struct {
	Namespace     string
	LabelSelector string
}

type KubeCtlAPIActions

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

KubeCtlAPIActions provides a way to collect and copy files using kubectl

func NewK8sAPI

func NewK8sAPI(kubeArgs KubeArgs, hook shutdown.CancelHook) (*KubeCtlAPIActions, error)

NewK8sAPI is the only supported way to initialize the NewK8sAPI struct one must pass the path to kubectl

func (*KubeCtlAPIActions) CleanupRemote

func (c *KubeCtlAPIActions) CleanupRemote() error

func (*KubeCtlAPIActions) CopyFromHost

func (c *KubeCtlAPIActions) CopyFromHost(hostString string, source, destination string) (out string, err error)

func (*KubeCtlAPIActions) CopyToHost

func (c *KubeCtlAPIActions) CopyToHost(hostString string, source, destination string) (out string, err error)

func (*KubeCtlAPIActions) GetClient

func (c *KubeCtlAPIActions) GetClient() *kubernetes.Clientset

func (*KubeCtlAPIActions) GetCoordinators

func (c *KubeCtlAPIActions) GetCoordinators() (podName []string, err error)

func (*KubeCtlAPIActions) GetExecutors

func (c *KubeCtlAPIActions) GetExecutors() (podName []string, err error)

func (*KubeCtlAPIActions) HelpText

func (c *KubeCtlAPIActions) HelpText() string

func (*KubeCtlAPIActions) HostExecute

func (c *KubeCtlAPIActions) HostExecute(mask bool, hostString string, args ...string) (out string, err error)

func (*KubeCtlAPIActions) HostExecuteAndStream

func (c *KubeCtlAPIActions) HostExecuteAndStream(mask bool, hostString string, output cli.OutputHandler, pat string, args ...string) (err error)

func (*KubeCtlAPIActions) Name

func (c *KubeCtlAPIActions) Name() string

func (*KubeCtlAPIActions) SearchPods

func (c *KubeCtlAPIActions) SearchPods(compare func(container string) bool) (podName []string, err error)

func (*KubeCtlAPIActions) SetHostPid

func (c *KubeCtlAPIActions) SetHostPid(host, pidFile string)

type TarPipe

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

func (*TarPipe) Read

func (t *TarPipe) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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