MCPcopy Create free account
hub / github.com/rilldata/rill / updateStatus

Method updateStatus

runtime/catalog_cache.go:404–419  ·  view source on GitHub ↗

updateStatus updates the ephemeral status fields on a resource. The values of these fields are reset next time a catalog cache is created.

(name *runtimev1.ResourceName, status runtimev1.ReconcileStatus, reconcileOn time.Time)

Source from the content-addressed store, hash-verified

402// updateStatus updates the ephemeral status fields on a resource.
403// The values of these fields are reset next time a catalog cache is created.
404func (c *catalogCache) updateStatus(name *runtimev1.ResourceName, status runtimev1.ReconcileStatus, reconcileOn time.Time) error {
405 r, err := c.get(name, true, true)
406 if err != nil {
407 return err
408 }
409 c.unlink(r)
410 r.Meta.ReconcileStatus = status
411 if reconcileOn.IsZero() {
412 r.Meta.ReconcileOn = nil
413 } else {
414 r.Meta.ReconcileOn = timestamppb.New(reconcileOn)
415 }
416 c.link(r)
417 c.addEvent(r.Meta.Name, r, runtimev1.ResourceEvent_RESOURCE_EVENT_WRITE)
418 return nil
419}
420
421// delete permanently deletes a resource from the catalog (a hard delete).
422// Afterwards, the resource can no longer be accessed.

Callers 3

markPendingMethod · 0.80
invokeMethod · 0.80

Calls 5

getMethod · 0.95
unlinkMethod · 0.95
linkMethod · 0.95
addEventMethod · 0.95
IsZeroMethod · 0.45

Tested by

no test coverage detected