sl4f

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigurationA        Configuration = "a"
	ConfigurationB                      = "b"
	ConfigurationRecovery               = "recovery"
)
View Source
const (
	ConfigurationStatusHealthy    ConfigurationStatus = "healthy"
	ConfigurationStatusPending                        = "pending"
	ConfigurationStatusUnbootable                     = "unbootable"
)

Variables

View Source
var ErrInvalidPaverMethod error = errors.New("Invalid paver facade method")
View Source
var ErrNotSupported error = errors.New("not supported")

Functions

This section is empty.

Types

type Asset

type Asset string
const (
	AssetKernel               Asset = "kernel"
	AssetVerifiedBootMetadata       = "verified_boot_metadata"
)

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a wrapper around sl4f that supports auto-installing and starting sl4f on the target.

If the target already has sl4f running, this client will not start a new instance.

This client requires the target to contain the "pkgctl" binary and for the target to have the "run" and "sl4f" packages available at "fuchsia-pkg://host_target_testing_sl4f".

func NewClient

func NewClient(ctx context.Context, sshClient *sshutil.Client, addr string, repoName string) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) FileDelete

func (c *Client) FileDelete(ctx context.Context, path string) error

FileDelete deletes the given path from the target, failing if it does not exist.

func (*Client) FileRead

func (c *Client) FileRead(ctx context.Context, path string) ([]byte, error)

FileRead reads path from the target.

func (*Client) FileWrite

func (c *Client) FileWrite(ctx context.Context, path string, buf []byte) error

FileWrite writes buf to path on the target.

func (*Client) GetSystemImageMerkle

func (c *Client) GetSystemImageMerkle(ctx context.Context) (string, error)

GetSystemImageMerkle returns the merkle root of the system_image package

func (*Client) PathExists

func (c *Client) PathExists(ctx context.Context, path string) (bool, error)

PathExists determines if the path exists on the target.

func (*Client) PathStat

func (c *Client) PathStat(ctx context.Context, path string) (PathMetadata, error)

PathStat deletes the given path from the target, failing if it does not exist.

func (*Client) PaverQueryActiveConfiguration

func (c *Client) PaverQueryActiveConfiguration(ctx context.Context) (Configuration, error)

PaverQueryActiveConfiguration determines the active boot configuration of the target, if supported.

func (*Client) PaverQueryConfigurationStatus

func (c *Client) PaverQueryConfigurationStatus(ctx context.Context, configuration Configuration) (ConfigurationStatus, error)

PaverQueryConfigurationStatus determines the status of the given boot slot, if supported.

func (*Client) PaverQueryCurrentConfiguration

func (c *Client) PaverQueryCurrentConfiguration(ctx context.Context) (Configuration, error)

PaverQueryCurrentConfiguration determines the active boot configuration of the target, if supported.

func (*Client) PaverReadAsset

func (c *Client) PaverReadAsset(ctx context.Context, configuration Configuration, asset Asset) ([]byte, error)

PaverReadAsset reads the requested asset from the device.

func (*Client) ValidateStaticPackages

func (c *Client) ValidateStaticPackages(ctx context.Context) error

ValidateStaticPackages checks that all static packages have no missing blobs.

type Configuration

type Configuration string

type ConfigurationStatus

type ConfigurationStatus string

type PathMetadata

type PathMetadata struct {
	Mode os.FileMode
	Size int64
}

Jump to

Keyboard shortcuts

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