Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The constants below are the names of the plugins that can be dispensed // from the plugin server. ProviderPluginName = "provider" )
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
MagicCookieKey: "TF_PLUGIN_MAGIC_COOKIE",
MagicCookieValue: "d602bf8f470bc67ca7faa0386276bbdd4330efaf76d1a219cb4d6991ca9872b2",
}
Handshake is the HandshakeConfig used to configure clients and servers.
Functions ¶
Types ¶
type GRPCProviderFunc ¶
type GRPCProviderFunc func() proto.ProviderServer
type ProviderFunc ¶
type ReattachConfig ¶
type ReattachConfig struct { Protocol string Pid int Test bool Addr ReattachConfigAddr }
ReattachConfig holds the information Terraform needs to be able to attach itself to a provider process, so it can drive the process.
func DebugServe ¶
func DebugServe(ctx context.Context, opts *ServeOpts) (ReattachConfig, <-chan struct{}, error)
DebugServe starts a plugin server in debug mode; this should only be used when the provider will manage its own lifecycle. It is not recommended for normal usage; Serve is the correct function for that.
type ReattachConfigAddr ¶
ReattachConfigAddr is a JSON-encoding friendly version of net.Addr.
type ServeOpts ¶
type ServeOpts struct { ProviderFunc ProviderFunc // Wrapped versions of the above plugins will automatically shimmed and // added to the GRPC functions when possible. GRPCProviderFunc GRPCProviderFunc // Logger is the logger that go-plugin will use. Logger hclog.Logger // TestConfig should only be set when the provider is being tested; it // will opt out of go-plugin's lifecycle management and other features, // and will use the supplied configuration options to control the // plugin's lifecycle and communicate connection information. See the // go-plugin GoDoc for more information. TestConfig *plugin.ServeTestConfig }
ServeOpts are the configurations to serve a plugin.
Click to show internal directories.
Click to hide internal directories.