From c39e9e107f9883a51e2720983a97d0782c5e2574 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 15 Aug 2018 13:21:25 -0400 Subject: [PATCH] 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. --- providers/provider.go | 3 +++ provisioners/provisioner.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/providers/provider.go b/providers/provider.go index c4044b4be..7deb608a2 100644 --- a/providers/provider.go +++ b/providers/provider.go @@ -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 { diff --git a/provisioners/provisioner.go b/provisioners/provisioner.go index 93eda89df..e53c88488 100644 --- a/provisioners/provisioner.go +++ b/provisioners/provisioner.go @@ -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 {