Documentation
¶
Index ¶
- func CleanUpReportsOnDisk(crashDir string)
- func FormatDirectoryListing(dirPath string) (string, error)
- func GetCrashDir() string
- func GetUserCountry() (string, error)
- func InitReporter(ctx context.Context)
- func MaskAPIKey(key string) string
- func WriteReport(mainErr error, runtimeInfo string, settings config.Settings, ...) (string, error)
- type ExecutionScope
- type GlobalScope
- type ReporterInstance
- func (r *ReporterInstance) ClearAllRecords()
- func (r *ReporterInstance) ClearExecutionRecords()
- func (r *ReporterInstance) GetScopes() (GlobalScope, ExecutionScope)
- func (r *ReporterInstance) GetSnapshotsString() string
- func (r *ReporterInstance) GetUptime() time.Duration
- func (r *ReporterInstance) Record(update func(*GlobalScope, *ExecutionScope))
- func (r *ReporterInstance) SaveExecSnapshot(step string, state string)
- func (r *ReporterInstance) SaveSnapshot(step string, state string)
- type RuntimeInfo
- type SnapshotType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanUpReportsOnDisk ¶
func CleanUpReportsOnDisk(crashDir string)
func FormatDirectoryListing ¶
func GetCrashDir ¶
func GetCrashDir() string
func GetUserCountry ¶
GetUserCountry fetches the user's country from Mullvad's API
func InitReporter ¶
Reporter returns the global reporter instance
func MaskAPIKey ¶
Types ¶
type ExecutionScope ¶
ExecutionScope holds information specific to current processing
type GlobalScope ¶
type GlobalScope struct { StartTime time.Time FFmpegPath string FFmpegVersion string MediaInfoVer string }
GlobalScope holds program-wide information
type ReporterInstance ¶
type ReporterInstance struct {
// contains filtered or unexported fields
}
var (
Reporter *ReporterInstance
)
func (*ReporterInstance) ClearAllRecords ¶
func (r *ReporterInstance) ClearAllRecords()
func (*ReporterInstance) ClearExecutionRecords ¶
func (r *ReporterInstance) ClearExecutionRecords()
func (*ReporterInstance) GetScopes ¶
func (r *ReporterInstance) GetScopes() (GlobalScope, ExecutionScope)
GetScopes returns both global and execution scopes
func (*ReporterInstance) GetSnapshotsString ¶
func (r *ReporterInstance) GetSnapshotsString() string
GetSnapshotsString returns a formatted string of all relevant snapshots
func (*ReporterInstance) GetUptime ¶
func (r *ReporterInstance) GetUptime() time.Duration
GetUptime returns the duration since reporter was started
func (*ReporterInstance) Record ¶
func (r *ReporterInstance) Record(update func(*GlobalScope, *ExecutionScope))
Record updates either global or execution scope information
func (*ReporterInstance) SaveExecSnapshot ¶
func (r *ReporterInstance) SaveExecSnapshot(step string, state string)
func (*ReporterInstance) SaveSnapshot ¶
func (r *ReporterInstance) SaveSnapshot(step string, state string)
Snapshots are assumed to belong to global scope by default
type RuntimeInfo ¶
RuntimeInfo holds the runtime information and collection utilities.
func NewRuntimeInfo ¶
func NewRuntimeInfo() *RuntimeInfo
NewRuntimeInfo creates a new RuntimeInfo instance with the current time.
func (*RuntimeInfo) String ¶
func (ri *RuntimeInfo) String() string
String generates the complete runtime information report.
type SnapshotType ¶
type SnapshotType int
const ( GlobalSnapshot SnapshotType = iota ExecutionSnapshot )