clientreport

package
v0.0.0-...-028f1de Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitNetstatTimer

func InitNetstatTimer() error

func LogAndReportIgnorePanic

func LogAndReportIgnorePanic(payload interface{}, stacktrace []byte)

func LogAndReportPanic

func LogAndReportPanic(payload interface{}, stacktrace []byte)

LogAndReportPanic reports panic to server and log to file then exit

func ReportCommandOutput

func ReportCommandOutput(reportType string, command string, arguments []string) (string, error)

ReportCommandOutput executes specified command and reports its output

func ReportPanic

func ReportPanic(payload interface{}, stacktrace []byte, exit bool)

ReportPanic reports panic to server and log to file, exit program or ignore according to exit parameter

func ReportUpdateFailure

func ReportUpdateFailure(failureType string, failure UpdateFailure) (string, error)

func SendReport

func SendReport(report ClientReport) (string, error)

SendReport marshals client report data and sends to server

Types

type ClientReport

type ClientReport struct {
	ReportType string `json:"type"`
	Info       string `json:"info"`
}

type UpdateFailure

type UpdateFailure struct {
	UpdateInfo     interface{}            `json:"updateInfo"`
	FailureContext map[string]interface{} `json:"failureContext"`
	ErrorMessage   string                 `json:"errorMessage"`
}

Jump to

Keyboard shortcuts

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