flare

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 46 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateArchive

func CreateArchive(local bool, distPath, pyChecksPath string, logFilePaths []string, pdata ProfileData, ipcError error) (string, error)

CreateArchive packages up the files

func CreateDCAArchive

func CreateDCAArchive(local bool, distPath, logFilePath string) (string, error)

CreateDCAArchive packages up the files

func CreatePerformanceProfile added in v0.9.0

func CreatePerformanceProfile(prefix, debugURL string, cpusec int, target *ProfileData) error

CreatePerformanceProfile adds a set of heap and CPU profiles into target, using cpusec as the CPU profile duration, debugURL as the target URL for fetching the profiles and prefix as a prefix for naming them inside target.

It is accepted to pass a nil target.

func CreateSecurityAgentArchive

func CreateSecurityAgentArchive(local bool, logFilePath string, runtimeStatus map[string]interface{}) (string, error)

CreateSecurityAgentArchive packages up the files

func GetClusterAgentConfigCheck

func GetClusterAgentConfigCheck(w io.Writer, withDebug bool) error

GetClusterAgentConfigCheck proxies GetConfigCheck overidding the URL

func GetClusterAgentDiagnose

func GetClusterAgentDiagnose(w io.Writer) error

GetClusterAgentDiagnose dumps the connectivity checks diagnose to the writer

func GetClusterChecks

func GetClusterChecks(w io.Writer) error

GetClusterChecks dumps the clustercheck dispatching state to the writer

func GetConfigCheck

func GetConfigCheck(w io.Writer, withDebug bool) error

GetConfigCheck dump all loaded configurations to the writer

func GetEndpointsChecks

func GetEndpointsChecks(w io.Writer) error

GetEndpointsChecks dumps the endpointschecks dispatching state to the writer

func PrintConfig

func PrintConfig(w io.Writer, c integration.Config)

PrintConfig prints a human-readable representation of a configuration

func QueryDCAMetrics

func QueryDCAMetrics() ([]byte, error)

QueryDCAMetrics gets the metrics payload exposed by the cluster agent

func SendFlare

func SendFlare(archivePath string, caseID string, email string) (string, error)

SendFlare will send a flare and grab the local hostname

func SendFlareWithHostname

func SendFlareWithHostname(archivePath string, caseID string, email string, hostname string) (string, error)

SendFlareWithHostname sends a flare with a set hostname

Types

type ProfileData added in v0.9.0

type ProfileData map[string][]byte

ProfileData maps (pprof) profile names to the profile data.

type RedactingWriter

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

RedactingWriter is a writer that will redact content before writing to target

func NewRedactingWriter

func NewRedactingWriter(t string, p os.FileMode, buffered bool) (*RedactingWriter, error)

NewRedactingWriter instantiates a RedactingWriter to target with given permissions

func (*RedactingWriter) Close

func (f *RedactingWriter) Close() error

Close closes the underlying file, if buffered previously flushes the contents

func (*RedactingWriter) Flush

func (f *RedactingWriter) Flush() error

Flush if this is a buffered writer, it flushes the buffer, otherwise NOP

func (*RedactingWriter) RegisterReplacer

func (f *RedactingWriter) RegisterReplacer(r log.Replacer)

RegisterReplacer register additional replacers to run on stream

func (*RedactingWriter) Truncate

func (f *RedactingWriter) Truncate(size int64) error

Truncate truncates the file of the target file to the specified size

func (*RedactingWriter) Write

func (f *RedactingWriter) Write(p []byte) (int, error)

Write writes the redacted byte stream, applying all replacers and credential cleanup to target

func (*RedactingWriter) WriteFromFile

func (f *RedactingWriter) WriteFromFile(filePath string) (int, error)

WriteFromFile will read contents from file and write them redacted to target

type SearchPaths

type SearchPaths map[string]string

SearchPaths is just an alias for a map of strings

Jump to

Keyboard shortcuts

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