gather

package
v0.0.0-...-8cdc541 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addon

type Addon interface {
	// Inspect a resource and gather related data.
	Inspect(*unstructured.Unstructured) error
}

type AgentPod

type AgentPod struct {
	Client *kubernetes.Clientset
	Log    *zap.SugaredLogger
	Pod    *corev1.Pod
}

func NewAgentPod

func NewAgentPod(name string, client *kubernetes.Clientset, log *zap.SugaredLogger) *AgentPod

func (*AgentPod) Create

func (a *AgentPod) Create() error

func (*AgentPod) Delete

func (a *AgentPod) Delete()

func (AgentPod) String

func (a AgentPod) String() string

func (*AgentPod) WaitUntilRunning

func (a *AgentPod) WaitUntilRunning() error

type Gatherer

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

func New

func New(config *rest.Config, directory string, opts Options) (*Gatherer, error)

func (*Gatherer) Count

func (g *Gatherer) Count() int32

func (*Gatherer) Gather

func (g *Gatherer) Gather() error

type LogsAddon

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

func NewLogsAddon

func NewLogsAddon(config *rest.Config, httpClient *http.Client, out *OutputDirectory, opts *Options, q Queuer) (*LogsAddon, error)

func (*LogsAddon) Inspect

func (g *LogsAddon) Inspect(pod *unstructured.Unstructured) error

type Options

type Options struct {
	Kubeconfig string
	Context    string
	Namespaces []string
	Addons     []string
	Log        *zap.SugaredLogger
}

type OutputDirectory

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

func (*OutputDirectory) CreateAddonDir

func (o *OutputDirectory) CreateAddonDir(name string, more ...string) (string, error)

func (*OutputDirectory) CreateClusterResource

func (o *OutputDirectory) CreateClusterResource(resource string, name string) (io.WriteCloser, error)

func (*OutputDirectory) CreateContainerLog

func (o *OutputDirectory) CreateContainerLog(namespace string, pod string, container string, name string) (io.WriteCloser, error)

func (*OutputDirectory) CreateNamespacedResource

func (o *OutputDirectory) CreateNamespacedResource(namespace string, resource string, name string) (io.WriteCloser, error)

type Queuer

type Queuer interface {
	Queue(WorkFunc)
}

type RemoteCommand

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

func NewRemoteCommand

func NewRemoteCommand(pod *corev1.Pod, opts *Options, log *zap.SugaredLogger, directroy string) *RemoteCommand

func (*RemoteCommand) Filename

func (c *RemoteCommand) Filename(command ...string) string

func (*RemoteCommand) Gather

func (c *RemoteCommand) Gather(command ...string) error

type RemoteDirectory

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

func NewRemoteDirectory

func NewRemoteDirectory(pod *corev1.Pod, opts *Options, log *zap.SugaredLogger) *RemoteDirectory

func (*RemoteDirectory) Gather

func (d *RemoteDirectory) Gather(src string, dst string) error

type RookAddon

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

func NewRookCephAddon

func NewRookCephAddon(config *rest.Config, client *http.Client, out *OutputDirectory, opts *Options, q Queuer) (*RookAddon, error)

func (*RookAddon) Inspect

func (a *RookAddon) Inspect(cephcluster *unstructured.Unstructured) error

type WorkFunc

type WorkFunc func() error

type WorkQueue

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

func NewWorkQueue

func NewWorkQueue(workers int, size int) *WorkQueue

func (*WorkQueue) Queue

func (q *WorkQueue) Queue(work WorkFunc)

func (*WorkQueue) Start

func (q *WorkQueue) Start()

func (*WorkQueue) Wait

func (q *WorkQueue) Wait() error

Jump to

Keyboard shortcuts

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