Documentation ¶
Overview ¶
Package flare implements helpers to parse a Datadog Agent Flare and fetch its content
Index ¶
- type Flare
- func (flare *Flare) GetAgentVersion() string
- func (flare *Flare) GetEmail() string
- func (flare *Flare) GetFile(path string) (*zip.File, error)
- func (flare *Flare) GetFileContent(path string) (string, error)
- func (flare *Flare) GetFileInfo(path string) (fs.FileInfo, error)
- func (flare *Flare) GetFilenames() []string
- func (flare *Flare) GetHostname() string
- func (flare *Flare) GetPermission(path string) (os.FileMode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flare ¶
type Flare struct {
// contains filtered or unexported fields
}
Flare contains all the information sent by the Datadog Agent when using the Flare command zipFiles is a mapping between filenames and *zip.File obtained from zip.Reader struct.
* `email`: email provided when creating the flare. * `zipFiles`: map between filenames and their information in the form of a zip.File object * `agentVersion`: the version of the Agent which created the flare. * `hostname`: hostname of the host on which the flare was created. Also the name of the flare root folder.
func ParseRawFlare ¶
ParseRawFlare parses the flare payload sent by the Fake Intake into a manageable Flare struct For that it parses the multipart data from the flare request and then parses the flare zip raw content.
func (*Flare) GetAgentVersion ¶
GetAgentVersion is a getter for the 'agentVersion' field
func (*Flare) GetFile ¶
GetFile returns a *zip.File whose name is 'path' or 'path/'. Returns an error if the file does not exist
func (*Flare) GetFileContent ¶
GetFileContent gets the content from a file and returns it as a string. Returns an error if the file does not exist
func (*Flare) GetFileInfo ¶
GetFileInfo returns a fs.FileInfo associated to the file whose name is 'path' or 'path/'. Returns an error if the file does not exist
func (*Flare) GetFilenames ¶
GetFilenames returns all the filenames in the flare archive
func (*Flare) GetHostname ¶
GetHostname is a getter for the 'hostname' field