Documentation
Index ¶
- func Cmp(iv2Asset, ufsAsset *ufspb.Asset) bool
- func Compare(iv2Machine, ufsMachine *ufspb.Machine) bool
- func GetAllAssetInfo(ctx context.Context, client *datastore.Client) (map[string]*iv2pr2.AssetInfo, error)
- func GetAllAssets(ctx context.Context, client *datastore.Client) ([]*iv2pr.ChopsAsset, error)
- func GetAssetToHostnameMap(ctx context.Context, client *bigquery.Client) (map[string]string, error)
- func InitServer(srv *server.Server, opts Options)
- func SyncAssetInfoFromHaRT(ctx context.Context) error
- func SyncAssetsFromIV2(ctx context.Context) error
- func SyncMachinesFromAssets(ctx context.Context) error
- func Use(ctx context.Context, bqClient *bigquery.Client) context.Context
- func UseProject(ctx context.Context, project string) context.Context
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllAssetInfo ¶
func GetAllAssetInfo(ctx context.Context, client *datastore.Client) (map[string]*iv2pr2.AssetInfo, error)
GetAllAssetInfo retrieves all the asset info data from inventory-V2
func GetAllAssets ¶
GetAllAssets retrieves all the asset data from inventory-V2
func GetAssetToHostnameMap ¶
GetAssetToHostnameMap gets the asset tag to hostname mapping from assets_in_swarming BQ table
func InitServer ¶
InitServer initializes a purger server.
func SyncAssetInfoFromHaRT ¶
SyncAssetInfoFromHaRT publishes the request for asset info to HaRT.
The response for this request will be made to an endpoint on an RPC call. This function only checks for the assets that have Device info missing or the last update on the device was 48 hours ago.
func SyncAssetsFromIV2 ¶
SyncAssetsFromIV2 updates assets table in UFS using data from IV2
func SyncMachinesFromAssets ¶
SyncMachinesFromAssets updates machines table from assets table
Checks all the DUT and Labstation assets and creates/updates machines if required.