service

package
v0.0.0-...-dc0012d Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Container for the FoilProvision state machine

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TargetBuild

func TargetBuild(imagePath string) (string, error)

Types

type FoilService

type FoilService struct {
	Connection      common_utils.ServiceAdapterInterface
	MachineMetadata metadata.MachineMetadata
	// ImagePath is the android build explorer path.
	// example1: android-build/build_explorer/build_details/P78687640/brya-trunk_staging-userdebug/android-desktop-ota-packages.zip
	// example2: android-build/build_explorer/artifacts_list/12330924/brya-trunk_staging-userdebug/brya-ota-12330924.zip
	ImagePath        *conf.StoragePath
	OverwritePayload *conf.StoragePath
	SkipUpdate       bool
	QuickResetDevice bool
	DutIp            string
	UpdateEnginePid  string
	CurrentBuild     string
	TargetBuild      string
	CacheServerUrl   url.URL
	DutClient        api.DutServiceClient
	ServoNexusAddr   string
	Dut              *lab_api.Dut
	Req              *api.InstallRequest
	CrossOver        bool
	Params           *cross_over.CrossOverParameters
}

FoilService inherits ServiceInterface

func NewFoilService

func NewFoilService(dut *lab_api.Dut, req *api.InstallRequest, dutClient api.DutServiceClient, servoNexusAddr string) (*FoilService, error)

func (*FoilService) CleanupOnFailure

func (c *FoilService) CleanupOnFailure(states []common_utils.ServiceState, executionErr error) error

CleanupOnFailure is called if one of service's states fails to Execute() and should clean up the temporary files, and undo the execution, if feasible.

Jump to

Keyboard shortcuts

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