report

package
v0.0.0-...-f0d17a2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package report contains functions that process kernel output, detect/extract crash messages, symbolize them, etc.

Index

Constants

View Source
const MemoryLeakPrefix = "memory leak in "
View Source
const UnexpectedKernelReboot = "unexpected kernel reboot"

Variables

This section is empty.

Functions

func Fuzz

func Fuzz(data []byte) int

func IsSuppressed

func IsSuppressed(reporter Reporter, output []byte) bool

Types

type Report

type Report struct {
	// Title contains a representative description of the first oops.
	Title string
	// Report contains whole oops text.
	Report []byte
	// Output contains whole raw console output as passed to Reporter.Parse.
	Output []byte
	// StartPos/EndPos denote region of output with oops message(s).
	StartPos int
	EndPos   int
	// Suppressed indicates whether the report should not be reported to user.
	Suppressed bool
	// Corrupted indicates whether the report is truncated of corrupted in some other way.
	Corrupted bool
	// CorruptedReason contains reason why the report is marked as corrupted.
	CorruptedReason string
	// Maintainers is list of maintainer emails (filled in by Symbolize).
	Maintainers []string
	// contains filtered or unexported fields
}

type Reporter

type Reporter interface {
	// ContainsCrash searches kernel console output for oops messages.
	ContainsCrash(output []byte) bool

	// Parse extracts information about oops from console output.
	// Returns nil if no oops found.
	Parse(output []byte) *Report

	// Symbolize symbolizes rep.Report and fills in Maintainers.
	Symbolize(rep *Report) error
}

func NewReporter

func NewReporter(cfg *mgrconfig.Config) (Reporter, error)

NewReporter creates reporter for the specified OS/Type.

Jump to

Keyboard shortcuts

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