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)
| 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. |
| 404 | func (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. |
no test coverage detected