engine: resources, graph: Change the Close method to Cleanup

This also changes a few similarly named methods. Clearer what it's doing
in terms of cleanup vs. causing some action.
This commit is contained in:
James Shubin
2023-08-08 00:19:51 -04:00
parent 63f05e12ca
commit 514927c0b3
39 changed files with 125 additions and 123 deletions

View File

@@ -239,8 +239,8 @@ func (obj *VirtRes) Init(init *engine.Init) error {
return nil
}
// Close runs some cleanup code for this resource.
func (obj *VirtRes) Close() error {
// Cleanup is run by the engine to clean up after the resource is done.
func (obj *VirtRes) Cleanup() error {
// By the time that this Close method is called, the engine promises
// that the Watch loop has previously shutdown! (Assuming no bugs!)
// TODO: As a result, this is an extra check which shouldn't be needed,