MCPcopy Create free account
hub / github.com/jetkvm/kvm / rpcCheckUpdateComponents

Function rpcCheckUpdateComponents

ota.go:170–182  ·  view source on GitHub ↗

rpcCheckUpdateComponents checks the update status for the given components

(params updateParams, includePreRelease bool)

Source from the content-addressed store, hash-verified

168
169// rpcCheckUpdateComponents checks the update status for the given components
170func rpcCheckUpdateComponents(params updateParams, includePreRelease bool) (*ota.UpdateStatus, error) {
171 updateParams := ota.UpdateParams{
172 DeviceID: GetDeviceID(),
173 SKU: GetDeviceSKU(),
174 IncludePreRelease: includePreRelease,
175 Components: params.Components,
176 }
177 info, err := otaState.GetUpdateStatus(context.Background(), updateParams)
178 if err != nil {
179 return nil, fmt.Errorf("failed to check update: %w", err)
180 }
181 return info, nil
182}
183
184func rpcTryUpdateComponents(params updateParams, includePreRelease bool, resetConfig bool) error {
185 updateParams := ota.UpdateParams{

Callers

nothing calls this directly

Calls 4

GetDeviceIDFunction · 0.85
GetDeviceSKUFunction · 0.85
GetUpdateStatusMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected