inventory

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: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

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