Documentation ¶
Overview ¶
Package ufsdutinfo implement loading Skylab DUT inventory(UFS) info for the worker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { DUT *inventory.DeviceUnderTest StableVersions map[string]string // contains filtered or unexported fields }
Store holds a DUT's inventory info and adds a Close method.
func LoadByHostname ¶
func LoadByHostname(ctx context.Context, b *swmbot.Info, hostname string, f UpdateFunc) (*Store, error)
LoadByHostname loads the DUT's info from the UFS by hostname. This function returns a Store that should be closed to update the inventory with any changes to the info, using a supplied UpdateFunc. If UpdateFunc is nil, the inventory is not updated.
type UpdateFunc ¶
type UpdateFunc func(ctx context.Context, dutID string, old *inventory.DeviceUnderTest, new *inventory.DeviceUnderTest) error
UpdateFunc is used to implement inventory updating for any changes to the loaded DUT info.
Click to show internal directories.
Click to hide internal directories.