dummy

package
v0.0.0-...-d37051a Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package dummy provides a fake device to demo flashing firmware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

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

Device is a fake device using the local filesystem for storage.

func New

func New(storage string) (*Device, error)

New creates a new dummy device instance using data from flags. TODO(al): figure out how/whether to remove the flag from in here.

func (Device) ApplyUpdate

func (d Device) ApplyUpdate(u api.UpdatePackage) error

ApplyUpdate applies the firmware update to the dummy device. The firmware image is stored in the dummy state directory in the firmware.bin file, and the rest of the update bundle is stored in the bundle.json file.

func (Device) DeviceCheckpoint

func (d Device) DeviceCheckpoint() ([]byte, error)

DeviceCheckpoint returns the latest log checkpoint stored on the device.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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