aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/go-plugin/grpc_controller.go
diff options
context:
space:
mode:
authorNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
committerNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
commit107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch)
treeca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/hashicorp/go-plugin/grpc_controller.go
parent844b5a68d8af4791755b8f0ad293cc99f5959183 (diff)
downloadterraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/hashicorp/go-plugin/grpc_controller.go')
-rw-r--r--vendor/github.com/hashicorp/go-plugin/grpc_controller.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/go-plugin/grpc_controller.go b/vendor/github.com/hashicorp/go-plugin/grpc_controller.go
new file mode 100644
index 0000000..1a8a8e7
--- /dev/null
+++ b/vendor/github.com/hashicorp/go-plugin/grpc_controller.go
@@ -0,0 +1,23 @@
1package plugin
2
3import (
4 "context"
5
6 "github.com/hashicorp/go-plugin/internal/plugin"
7)
8
9// GRPCControllerServer handles shutdown calls to terminate the server when the
10// plugin client is closed.
11type grpcControllerServer struct {
12 server *GRPCServer
13}
14
15// Shutdown stops the grpc server. It first will attempt a graceful stop, then a
16// full stop on the server.
17func (s *grpcControllerServer) Shutdown(ctx context.Context, _ *plugin.Empty) (*plugin.Empty, error) {
18 resp := &plugin.Empty{}
19
20 // TODO: figure out why GracefullStop doesn't work.
21 s.server.Stop()
22 return resp, nil
23}