Documentation ¶
Overview ¶
collection package provides the interface for collection implementation and the actual collection execution
collection package provides the interface for collection implementation and the actual collection execution
collection package provides the interface for collection implementation and the actual collection execution
collection package provides the interface for collection implementation and the actual collection execution
Index ¶
- Variables
- func ClusterK8sExecute(namespace string, cs CopyStrategy, ddfs helpers.Filesystem, c Collector, ...) error
- func ComposeCopy(conf HostCaptureConfiguration, source, destination string) (stdOut string, err error)
- func ComposeCopyTo(conf HostCaptureConfiguration, source, destination string) (stdOut string, err error)
- func ComposeExecute(conf HostCaptureConfiguration, command []string) (stdOut string, err error)
- func ComposeExecuteAndStream(conf HostCaptureConfiguration, output cli.OutputHandler, command []string) error
- func Execute(c Collector, s CopyStrategy, collectionArgs Args, clusterCollection ...func()) error
- func ExtractTarGz(gzFilePath, dest string) error
- func FindTarGzFiles(rootDir string) ([]string, error)
- func SanitizeArchivePath(d, t string) (v string, err error)
- type Args
- type ClusterInfo
- type Collector
- type CopyStrategy
- type FailedFiles
- type FindErr
- type HostCaptureConfiguration
- type SummaryInfo
- type SummaryInfoWriterError
Constants ¶
This section is empty.
Variables ¶
var DirPerms fs.FileMode = 0750
Functions ¶
func ClusterK8sExecute ¶ added in v0.2.0
func ClusterK8sExecute(namespace string, cs CopyStrategy, ddfs helpers.Filesystem, c Collector, k string) error
func ComposeCopy ¶ added in v0.2.2
func ComposeCopy(conf HostCaptureConfiguration, source, destination string) (stdOut string, err error)
Adds the sudo part into the CopyFromHost call
func ComposeCopyTo ¶ added in v0.3.0
func ComposeCopyTo(conf HostCaptureConfiguration, source, destination string) (stdOut string, err error)
Adds the sudo part into the CopyFromHost call
func ComposeExecute ¶ added in v0.2.2
func ComposeExecute(conf HostCaptureConfiguration, command []string) (stdOut string, err error)
Adds the sudo part into the HostExecute call
func ComposeExecuteAndStream ¶ added in v0.3.0
func ComposeExecuteAndStream(conf HostCaptureConfiguration, output cli.OutputHandler, command []string) error
Adds the sudo part into the HostExecute call
func Execute ¶
func Execute(c Collector, s CopyStrategy, collectionArgs Args, clusterCollection ...func()) error
func ExtractTarGz ¶ added in v0.3.0
func FindTarGzFiles ¶ added in v0.3.0
func SanitizeArchivePath ¶ added in v0.3.0
Sanitize archive file pathing from "G305: Zip Slip vulnerability"
Types ¶
type Args ¶
type Args struct { DDCfs helpers.Filesystem CoordinatorStr string ExecutorsStr string OutputLoc string SudoUser string CopyStrategy CopyStrategy }
type ClusterInfo ¶
type Collector ¶
type Collector interface { CopyFromHost(hostString string, isCoordinator bool, source, destination string) (out string, err error) CopyToHost(hostString string, isCoordinator bool, source, destination string) (out string, err error) CopyFromHostSudo(hostString string, isCoordinator bool, sudoUser, source, destination string) (out string, err error) CopyToHostSudo(hostString string, isCoordinator bool, sudoUser, source, destination string) (out string, err error) FindHosts(searchTerm string) (podName []string, err error) HostExecute(hostString string, isCoordinator bool, args ...string) (stdOut string, err error) HostExecuteAndStream(hostString string, output cli.OutputHandler, isCoordinator bool, args ...string) error HelpText() string }
type CopyStrategy ¶ added in v0.2.0
type FailedFiles ¶
func Capture ¶
func Capture(conf HostCaptureConfiguration, localDDCPath, localDDCYamlPath, outputLoc string, skipRESTCollect bool) (files []helpers.CollectedFile, failedFiles []FailedFiles, skippedFiles []string)
Capture collects diagnostics, conf files and log files from the target hosts. Failures are permissive and are first logged and then returned at the end with the reason for the failure.
type HostCaptureConfiguration ¶
type HostCaptureConfiguration struct { NodeCaptureOutput string IsCoordinator bool Collector Collector Host string OutputLocation string SudoUser string CopyStrategy CopyStrategy DDCfs helpers.Filesystem }
type SummaryInfo ¶
type SummaryInfo struct { ClusterInfo ClusterInfo `json:"clusterInfo"` CollectedFiles []helpers.CollectedFile `json:"collectedFiles"` FailedFiles []FailedFiles `json:"failedFiles"` SkippedFiles []string `json:"skippedFiles"` StartTimeUTC time.Time `json:"startTimeUTC"` EndTimeUTC time.Time `json:"endTimeUTC"` TotalRuntimeSeconds int64 `json:"totalRuntimeSeconds"` TotalBytesCollected int64 `json:"totalBytesCollected"` Executors []string `json:"executors"` Coordinators []string `json:"coordinators"` }
func (SummaryInfo) String ¶
func (summary SummaryInfo) String() (string, error)
type SummaryInfoWriterError ¶
type SummaryInfoWriterError struct { SummaryInfo SummaryInfo Err error }
func (SummaryInfoWriterError) Error ¶
func (w SummaryInfoWriterError) Error() string