Documentation ¶
Index ¶
- Constants
- type BundleInfo
- type Command
- type Copy
- type Gatherer
- func (g *Gatherer) AddCommand(name, cmd string, args ...string)
- func (g *Gatherer) AddCopiesFromPath(fileName, path string)
- func (g *Gatherer) AddCopy(srcPath string)
- func (g *Gatherer) AddOther(name string, execFunc func() ([]byte, error))
- func (g *Gatherer) AddTail(srcPath string, maxLines uint64)
- func (g *Gatherer) AddURL(name, url string)
- func (g *Gatherer) CreateBundleDir() error
- func (g *Gatherer) CreateBundleFile() (BundleInfo, error)
- func (g *Gatherer) ExecuteAll()
- func (g *Gatherer) FetchHostname(args ...string) string
- func (g *Gatherer) FindFilesToCopy(path, name string) []string
- type Other
- type Tail
- type URL
Constants ¶
const DefaultLogLines = 500000
DefaultLogLines in the default number of log lines we should ingest from journald.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleInfo ¶
BundleInfo is a type for a bundle's information
func NewBundleInfo ¶
func NewBundleInfo(bundlePath string) (BundleInfo, error)
NewBundleInfo extrapolates information about bundle from its path
type Command ¶
type Command struct { Name string // friendly name (used for uniq ref, file name, etc) Cmd string // command to run Args []string // arguments to the command OutputHandler func() (io.WriteCloser, error) }
Command represents a system command
type Gatherer ¶
type Gatherer struct {
// contains filtered or unexported fields
}
Gatherer defines values used in the log/data collection process
func NewGatherer ¶
NewGatherer returns an initialized Gatherer
func (*Gatherer) AddCommand ¶
AddCommand loads a new command into our list of commands to run
func (*Gatherer) AddCopiesFromPath ¶
AddCopiesFromPath finds files matching a given name under a given path, and adds them as copy operations
func (*Gatherer) CreateBundleDir ¶
CreateBundleDir will create the full path (mkdir -p) to the directory where all of the data will be collected for this run of the log gatherer
func (*Gatherer) CreateBundleFile ¶
func (g *Gatherer) CreateBundleFile() (BundleInfo, error)
CreateBundleFile creates a compressed archive (currently tar/gzip) of all the data collected on this run
func (*Gatherer) ExecuteAll ¶
func (g *Gatherer) ExecuteAll()
ExecuteAll executes all of the operations
func (*Gatherer) FetchHostname ¶
FetchHostname - Get the hostname for the currently running machine
func (*Gatherer) FindFilesToCopy ¶
FindFilesToCopy find files under a given path