server: Index | Files

package errorreporter

import ""

Package errorreporter provides error reporting functionality.


Package Files


func Do Uses

func Do(req *http.Request, err *error)

Do will be used as defer func to recover panic and report error if panic detected. Also update err if err != nil.

func Enabled Uses

func Enabled() bool

Enabled reports DefaultErrorReporter is configured to report crash to stackdriver.

func Flush Uses

func Flush()

Flush flushes DefaultErrorReporter.

func Report Uses

func Report(e errorreporting.Entry)

Report reports entry with DefaultErrorReporter.

func ReportSync Uses

func ReportSync(ctx context.Context, e errorreporting.Entry) error

ReportSync reports entry with DefaultErrorReporter.

type ErrorReporter Uses

type ErrorReporter interface {
    Close() error
    Report(e errorreporting.Entry)
    ReportSync(ctx context.Context, e errorreporting.Entry) error

ErrorReporter is an interface to report crash to stackdriver error reporting.

var DefaultErrorReporter ErrorReporter = nopErrorReporter{}

func New Uses

func New(ctx context.Context, projectID, serviceName string) ErrorReporter

New creates error reporter.

Package errorreporter imports 8 packages (graph) and is imported by 4 packages. Updated 2020-10-27. Refresh now. Tools for package owners.