dump

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

Backward Compatibility: Extracting the metadata from the path

View Source
const (
	DumpResultClusterNameRegex = `([A-Za-z0-9\.\-_]+)`
	DumpResultRunIDRegex       = `([a-z0-9]{26})`
	DumpResultExtensionRegex   = `\.?([a-z0-9\.]+)?`
	DumpResultPrefix           = "kubehound_"

	DumpResultTarWriterExtension = "tar.gz"
)

Variables

This section is empty.

Functions

func ParseMetadata added in v1.5.0

func ParseMetadata(ctx context.Context, metadataFilePath string) (collector.Metadata, error)

Types

type DumpIngestor

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

func NewDumpIngestor

func NewDumpIngestor(ctx context.Context, collector collector.CollectorClient, compression bool, directoryOutput string, runID *config.RunID) (*DumpIngestor, error)

func (*DumpIngestor) Close

func (d *DumpIngestor) Close(ctx context.Context) error

Close() is invoked by the collector to close all handlers used to dump k8s objects. The function flushes all writers and close all the handlers.

func (*DumpIngestor) DumpK8sObjects

func (d *DumpIngestor) DumpK8sObjects(ctx context.Context) error

func (*DumpIngestor) Metadata added in v1.5.0

func (d *DumpIngestor) Metadata() (collector.Metadata, error)

func (*DumpIngestor) OutputPath

func (d *DumpIngestor) OutputPath() string

type DumpResult added in v1.3.3

type DumpResult struct {
	Metadata collector.Metadata
	// contains filtered or unexported fields
}

func NewDumpResult added in v1.3.3

func NewDumpResult(clusterName, runID string, isCompressed bool) (*DumpResult, error)

func ParsePath added in v1.3.3

func ParsePath(path string) (*DumpResult, error)

func (*DumpResult) Compressed added in v1.3.3

func (i *DumpResult) Compressed()

func (*DumpResult) GetFilename added in v1.3.3

func (i *DumpResult) GetFilename() string

func (*DumpResult) GetFullPath added in v1.3.3

func (i *DumpResult) GetFullPath() string

./<clusterName>/kubehound_<clusterName>_<run_id>

func (*DumpResult) Validate added in v1.3.3

func (i *DumpResult) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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