Documentation
¶
Overview ¶
Package diag is a library of functionality to utilize the built-in Chrome network diagnostic routines.
Index ¶
- type MojoAPI
- type NetDiagService
- func (d *NetDiagService) Close(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)
- func (d *NetDiagService) RunRoutine(ctx context.Context, req *network.RunRoutineRequest) (*network.RoutineResult, error)
- func (d *NetDiagService) SetupDiagAPI(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MojoAPI ¶
type MojoAPI struct {
// contains filtered or unexported fields
}
MojoAPI is a struct that encapsulates a Network Diagnostics mojo remote. Functions are exposed to call the underlying diagnostics routines.
func NewMojoAPI ¶
NewMojoAPI returns a MojoAPI object that is connected to a network diagnostics mojo remote instance on success, or an error.
func (*MojoAPI) PollRoutine ¶
func (m *MojoAPI) PollRoutine(ctx context.Context, routine string, expectedResult *diag.RoutineResult) error
PollRoutine will continuously run the specified routine until the provided diag.RoutineResult is matched.
func (*MojoAPI) RunRoutine ¶
RunRoutine calls into the injected network diagnostics mojo API and returns a diag.RoutineResult on success, or an error.
type NetDiagService ¶
type NetDiagService struct {
// contains filtered or unexported fields
}
NetDiagService implements tast.cros.network.DiagService
func (*NetDiagService) Close ¶
Close will close the connectivity diagnostics application and the underlying Chrome instance.
func (*NetDiagService) RunRoutine ¶
func (d *NetDiagService) RunRoutine(ctx context.Context, req *network.RunRoutineRequest) (*network.RoutineResult, error)
RunRoutine will run the specified network diagnostic routine and return the result.
func (*NetDiagService) SetupDiagAPI ¶
SetupDiagAPI creates a new chrome instance and launches the connectivity diagnostics application to be used for running the network diagnostics.