ffx

package
v0.0.0-...-7a622f3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ErrNoDeviceList May be returned if the ffx fails to return a device list when asked.
	ErrNoDeviceList = fault.Const("Device list not returned")
	// ErrInvalidDeviceList May be returned if the device list could not be parsed.
	ErrInvalidDeviceList = fault.Const("Could not parse device list")
	// Tracing file couldn't be written to.
	ErrTraceFilePermissions = fault.Const("Tracing file permissions")
	// Start tracing command failed.
	ErrStartTrace = fault.Const("Start trace failed")
	// Trace providers command failed.
	ErrTraceProviders = fault.Const("Trace providers failed")
	// Trace providers format.
	ErrTraceProvidersFormat = fault.Const("Trace providers format")
)

Variables

FFX is the path to the ffx executable, or an empty string if the ffx executable was not found.

Functions

func Ffx

func Ffx() (file.Path, error)

func Monitor

func Monitor(ctx context.Context, r *bind.Registry, interval time.Duration) error

Monitor updates the registry with devices that are added and removed at the specified interval. Monitor returns once the context is cancelled.

func ParseDevices

func ParseDevices(ctx context.Context, stdout string) (map[string]bind.Status, error)

ParseDevices parses the json formatted device list from ffx.

Types

type DeviceList

type DeviceList []fuchsia.Device

DeviceList is a list of devices.

func Devices

func Devices(ctx context.Context) (DeviceList, error)

Devices returns the list of attached Fuchsia devices.

Jump to

Keyboard shortcuts

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