diag

package
v0.0.0-...-683b059 Latest Latest
Warning

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

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

Documentation

Overview

Package diag is a library of functionality to utilize the built-in Chrome network diagnostic routines.

Index

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

func NewMojoAPI(ctx context.Context, conn *chrome.Conn) (*MojoAPI, error)

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) Release

func (m *MojoAPI) Release(ctx context.Context) error

Release frees the resources help by the internal MojoAPI components.

func (*MojoAPI) RunRoutine

func (m *MojoAPI) RunRoutine(ctx context.Context, routine string) (*diag.RoutineResult, error)

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

func (d *NetDiagService) Close(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

Close will close the connectivity diagnostics application and the underlying Chrome instance.

func (*NetDiagService) RunRoutine

RunRoutine will run the specified network diagnostic routine and return the result.

func (*NetDiagService) SetupDiagAPI

func (d *NetDiagService) SetupDiagAPI(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)

SetupDiagAPI creates a new chrome instance and launches the connectivity diagnostics application to be used for running the network diagnostics.

Jump to

Keyboard shortcuts

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