add Close methods to the plugin interfaces

Close was previously an optional interface, because it's only applicable
on the client side but the types were shared accross all packages. Since
all plugins will now implement Close, it no longer needs to be optional.
This commit is contained in:
James Bardin 2018-08-15 13:21:25 -04:00 committed by Martin Atkins
parent c07ce1cd4b
commit c39e9e107f
2 changed files with 6 additions and 0 deletions

View File

@ -62,6 +62,9 @@ type Interface interface {
// ReadDataSource returns the data source's current state.
ReadDataSource(ReadDataSourceRequest) ReadDataSourceResponse
// Close shuts down the plugin process if applicable.
Close() error
}
type GetSchemaResponse struct {

View File

@ -32,6 +32,9 @@ type Interface interface {
// stop somehow failed and that the user should expect potentially waiting
// a longer period of time.
Stop() error
// Close shuts down the plugin process if applicable.
Close() error
}
type GetSchemaResponse struct {