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

@@ -388,10 +388,11 @@ func (obj *AwsEc2Res) Init(init *engine.Init) error {
return nil
}
// Close cleans up when we're done. This is needed to delete some of the AWS
// Cleanup cleans up when we're done. This is needed to delete some of the AWS
// objects created for the SNS endpoint.
func (obj *AwsEc2Res) Close() error {
func (obj *AwsEc2Res) Cleanup() error {
var errList error
// XXX: do these in a defer of Watch instead.
// clean up sns objects created by Init/snsWatch
if obj.snsClient != nil {
// delete the topic and associated subscriptions