harness

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package harness manages the setup and teardown of various Swarming bot resources for running lab tasks, like results directories and host info.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DUTHarness

type DUTHarness struct {
	BotInfo     *swmbot.Info
	DUTID       string
	DUTHostname string
	ResultsDir  string
	LocalState  *swmbot.LocalDUTState
	// contains filtered or unexported fields
}

DUTHarness holds information about a DUT's harness

func (*DUTHarness) Close

func (dh *DUTHarness) Close(ctx context.Context) error

Close closes and flushes out the harness resources. This is safe to call multiple times.

type Info

type Info struct {
	*swmbot.Info

	TaskResultsDir *resultsdir.Dir
	DUTs           []*DUTHarness
	// contains filtered or unexported fields
}

Info holds information about the Swarming bot harness.

func Open

func Open(ctx context.Context, b *swmbot.Info, o ...Option) (i *Info, err error)

Open opens and sets up the bot and task harness needed for Autotest jobs. An Info struct is returned with necessary fields, which must be closed.

func (*Info) Close

func (i *Info) Close(ctx context.Context) error

Close closes and flushes out the harness resources. This is safe to call multiple times.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is passed to Open to configure the harness. There can be two level of options, one directly applies to Info while another one will applies to each DUTHarness.

func UpdateInventory

func UpdateInventory(name string) Option

UpdateInventory returns an updateInventoryOpt that enables inventory updates. A task name to be associated with the inventory update should be provided.

Directories

Path Synopsis
Package hostinfo implements the parts of harness management pertaining to Autotest hostinfo.
Package hostinfo implements the parts of harness management pertaining to Autotest hostinfo.
Package localdutinfo implements opening and closing a DUT's local dut info stored on local disk(e.g.
Package localdutinfo implements opening and closing a DUT's local dut info stored on local disk(e.g.
Package resultsdir implements Autotest results directory creation and sealing.
Package resultsdir implements Autotest results directory creation and sealing.
Package ufsdutinfo implement loading Skylab DUT inventory(UFS) info for the worker.
Package ufsdutinfo implement loading Skylab DUT inventory(UFS) info for the worker.

Jump to

Keyboard shortcuts

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