goose: support provider cleanup functions

Documented and updated appropriate providers to reflect.

Reviewed-by: Tuo Shan <shantuo@google.com>
This commit is contained in:
Ross Light
2018-04-03 13:13:15 -07:00
parent 1380f96c06
commit ccf63fec5d
12 changed files with 213 additions and 13 deletions

View File

@@ -24,6 +24,8 @@ type call struct {
ins []types.Type
// out is the type produced by this provider call.
out types.Type
// hasCleanup is true if the provider call returns a cleanup function.
hasCleanup bool
// hasErr is true if the provider call returns an error.
hasErr bool
}
@@ -113,6 +115,7 @@ func solve(mc *providerSetCache, out types.Type, given []types.Type, sets []symr
args: args,
ins: ins,
out: typ,
hasCleanup: p.hasCleanup,
hasErr: p.hasErr,
})
return nil