mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-23 23:22:57 -06:00
some comments, package comments
This commit is contained in:
parent
8163d364c9
commit
0cda9a7539
10
plugin/plugin.go
Normal file
10
plugin/plugin.go
Normal file
@ -0,0 +1,10 @@
|
||||
// The plugin package exposes functions and helpers for communicating to
|
||||
// Terraform plugins which are implemented as standalone binary applications.
|
||||
//
|
||||
// plugin.Client fully manages the lifecycle of executing the application,
|
||||
// connecting to it, and returning the RPC client and service names for
|
||||
// connecting to it using the terraform/rpc package.
|
||||
//
|
||||
// plugin.Serve fully manages listeners to expose an RPC server from a binary
|
||||
// that plugin.Client can connect to.
|
||||
package plugin
|
@ -6,6 +6,8 @@ import (
|
||||
"github.com/hashicorp/terraform/terraform"
|
||||
)
|
||||
|
||||
// ResourceProvider is an implementation of terraform.ResourceProvider
|
||||
// that communicates over RPC.
|
||||
type ResourceProvider struct {
|
||||
Client *rpc.Client
|
||||
Name string
|
||||
@ -24,6 +26,8 @@ func (p *ResourceProvider) Configure(c map[string]interface{}) ([]string, error)
|
||||
return resp.Warnings, err
|
||||
}
|
||||
|
||||
// ResourceProviderServer is a net/rpc compatible structure for serving
|
||||
// a ResourceProvider. This should not be used directly.
|
||||
type ResourceProviderServer struct {
|
||||
Provider terraform.ResourceProvider
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user