Documentation ¶
Overview ¶
Package inventory contains datastore operations for caching inventory data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateDUTs ¶
func UpdateDUTs(ctx context.Context, duts []*inventory.DeviceUnderTest) error
UpdateDUTs updates the datastore cache of DUT inventory.
Types ¶
type DeviceUnderTest ¶
type DeviceUnderTest struct { // Data is a serialized inventory.DeviceUnderTest. Data []byte // Updated is the last time Data was refreshed from the source-of-truth. Updated time.Time }
DeviceUnderTest is a serialized cached inventory.DeviceUnderTest
func GetSerializedDUTByHostname ¶
func GetSerializedDUTByHostname(ctx context.Context, hostname string) (data *DeviceUnderTest, rerr error)
GetSerializedDUTByHostname gets the cached, serialized inventory.DeviceUnderTest for a DUT.
func GetSerializedDUTByID ¶
func GetSerializedDUTByID(ctx context.Context, id string) (dut *DeviceUnderTest, rerr error)
GetSerializedDUTByID gets the cached, serialized, inventory.DeviceUnderTest for a DUT.
Click to show internal directories.
Click to hide internal directories.