crashreport

package
v0.16.2-gitlab.9 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewCrashReporter = func(baseDir string, apiKey string) CrashReporter {
	if apiKey == "" {
		apiKey = defaultAPIKey
	}

	return &BugsnagCrashReporter{
		baseDir: baseDir,
		apiKey:  apiKey,
	}
}

NewCrashReporter creates a new bugsnag based CrashReporter. Needs an apiKey.

Functions

This section is empty.

Types

type BugsnagCrashReporter

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

func (*BugsnagCrashReporter) Send

func (r *BugsnagCrashReporter) Send(err CrashError) error

Send sends a crash report to bugsnag via an http call.

type CrashError

type CrashError struct {
	Cause       error
	Command     string
	Context     string
	DriverName  string
	LogFilePath string
}

CrashError describes an error that should be reported to bugsnag

func (CrashError) Error

func (e CrashError) Error() string

type CrashReporter

type CrashReporter interface {
	Send(err CrashError) error
}

Jump to

Keyboard shortcuts

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