diag

package
v0.0.0-...-9474aff Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package diag is a library of common functionality to utilize the Chrome network diagnostic routines.

Index

Constants

View Source
const (
	// VerdictUnknown is an unknown verdict.
	VerdictUnknown RoutineVerdict = -1
	// VerdictNoProblem means that the routine did not detect any problems.
	VerdictNoProblem = 0
	// VerdictProblem means that the routine detected at least one problem.
	VerdictProblem = 1
	// VerdictNotRun means that the routine was not executed.
	VerdictNotRun = 2
)
View Source
const (
	RoutineLanConnectivity      = "lanConnectivity"
	RoutineDNSResolverPresent   = "dnsResolverPresent"
	RoutineDNSResolution        = "dnsResolution"
	RoutineDNSLatency           = "dnsLatency"
	RoutineHTTPFirewall         = "httpFirewall"
	RoutineHTTPSFirewall        = "httpsFirewall"
	RoutineHTTPSLatency         = "httpsLatency"
	RoutineSecureWiFiConnection = "hasSecureWiFiConnection"
	RoutineSignalStrength       = "signalStrength"
	RoutineGatewayCanBePing     = "gatewayCanBePinged"
	RoutineCaptivePortal        = "captivePortal"
	RoutineVideoConferencing    = "videoConferencing"
)

List of network diagnostic routines

View Source
const NetDiagJs = `` /* 2767-byte string literal not displayed */

NetDiagJs is a stringified JS file that exposes the network diagnostics mojo API. TODO(crbug/1127165): convert this to a data file when supported by fixtures.

Variables

This section is empty.

Functions

func CheckRoutineResult

func CheckRoutineResult(result, expectedResult *RoutineResult) error

CheckRoutineResult compares the routine result to the expected result. If they are not the same an error is returned.

Types

type RoutineResult

type RoutineResult struct {
	Verdict  RoutineVerdict
	Problems []uint32
}

RoutineResult is a simplified data structure to hold the result of running a network diagnostic routine. It collapses the mojo problems union to a single Problems field for simplicity.

type RoutineVerdict

type RoutineVerdict int32

RoutineVerdict represents the possible return values a diagnostic routine can have.

Jump to

Keyboard shortcuts

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