kubernetes

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupPod

type BackupPod struct {
	Command       string
	PodName       string
	ContainerName string
	Namespace     string
	FileExtension string
}

BackupPod contains all information nessecary to execute the backupcommands.

type ExecData

type ExecData struct {
	Reader *io.PipeReader
	Done   chan bool
}

func PodExec

func PodExec(pod BackupPod, log logr.Logger) (*ExecData, error)

PodExec sends the command to the specified pod and returns a bytes buffer with the stdout

type PodLister

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

PodLister holds the state for listing the pods.

func NewPodLister

func NewPodLister(ctx context.Context, backupCommandAnnotation, fileExtensionAnnotation, namespace string, log logr.Logger) *PodLister

NewPodLister returns a PodLister configured to find the defined annotations.

func (*PodLister) ListPods

func (p *PodLister) ListPods() ([]BackupPod, error)

ListPods resturns a list of pods which have backup commands in their annotations.

Jump to

Keyboard shortcuts

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