Documentation ¶
Overview ¶
collection package provides the interface for collection implementation and the actual collection execution
collection module deals with specific k8s cluster level data collection
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 ComposeCopyNoSudo(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 ComposeExecuteNoSudo(conf HostCaptureConfiguration, command []string) (stdOut string, err error)
- func Execute(c Collector, s CopyStrategy, collectionArgs Args, ...) error
- func ExtractTarGz(gzFilePath, dest string) error
- func FindTarGzFiles(rootDir string) ([]string, error)
- func GetClusterLogs(namespace string, cs CopyStrategy, ddfs helpers.Filesystem, k 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 ¶
func ClusterK8sExecute(namespace string, cs CopyStrategy, ddfs helpers.Filesystem, c Collector, k string) error
func ComposeCopy ¶
func ComposeCopy(conf HostCaptureConfiguration, source, destination string) (stdOut string, err error)
Adds the sudo part into the CopyFromHost call
func ComposeCopyNoSudo ¶
func ComposeCopyNoSudo(conf HostCaptureConfiguration, source, destination string) (stdOut string, err error)
Some copy back actions should never change regardless of the sudo user being passed or not
func ComposeCopyTo ¶
func ComposeCopyTo(conf HostCaptureConfiguration, source, destination string) (stdOut string, err error)
Adds the sudo part into the CopyFromHost call
func ComposeExecute ¶
func ComposeExecute(conf HostCaptureConfiguration, command []string) (stdOut string, err error)
Adds the sudo part into the HostExecute call
func ComposeExecuteAndStream ¶
func ComposeExecuteAndStream(conf HostCaptureConfiguration, output cli.OutputHandler, command []string) error
Adds the sudo part into the HostExecute call
func ComposeExecuteNoSudo ¶
func ComposeExecuteNoSudo(conf HostCaptureConfiguration, command []string) (stdOut string, err error)
Some execute actions should never change regardless of the sudo user being passed or not
func Execute ¶
func Execute(c Collector, s CopyStrategy, collectionArgs Args, clusterCollection ...func([]string)) error
func ExtractTarGz ¶
func FindTarGzFiles ¶
func GetClusterLogs ¶ added in v0.6.0
func GetClusterLogs(namespace string, cs CopyStrategy, ddfs helpers.Filesystem, k string, pods []string) error
func SanitizeArchivePath ¶
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 DremioPAT string TransferDir string DDCYamlLoc string }
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 ¶
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 { IsCoordinator bool Collector Collector Host string OutputLocation string SudoUser string CopyStrategy CopyStrategy DDCfs helpers.Filesystem DremioPAT string TransferDir string }
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