Documentation ¶
Index ¶
- Constants
- Variables
- func Serve(opts *ServeOpts)
- type GRPCProvider
- func (p *GRPCProvider) ApplyResourceChange(r providers.ApplyResourceChangeRequest) (resp providers.ApplyResourceChangeResponse)
- func (p *GRPCProvider) Close() error
- func (p *GRPCProvider) Configure(r providers.ConfigureRequest) (resp providers.ConfigureResponse)
- func (p *GRPCProvider) GetSchema() (resp providers.GetSchemaResponse)
- func (p *GRPCProvider) ImportResourceState(r providers.ImportResourceStateRequest) (resp providers.ImportResourceStateResponse)
- func (p *GRPCProvider) PlanResourceChange(r providers.PlanResourceChangeRequest) (resp providers.PlanResourceChangeResponse)
- func (p *GRPCProvider) PrepareProviderConfig(r providers.PrepareProviderConfigRequest) (resp providers.PrepareProviderConfigResponse)
- func (p *GRPCProvider) ReadDataSource(r providers.ReadDataSourceRequest) (resp providers.ReadDataSourceResponse)
- func (p *GRPCProvider) ReadResource(r providers.ReadResourceRequest) (resp providers.ReadResourceResponse)
- func (p *GRPCProvider) Stop() error
- func (p *GRPCProvider) UpgradeResourceState(r providers.UpgradeResourceStateRequest) (resp providers.UpgradeResourceStateResponse)
- func (p *GRPCProvider) ValidateDataSourceConfig(r providers.ValidateDataSourceConfigRequest) (resp providers.ValidateDataSourceConfigResponse)
- func (p *GRPCProvider) ValidateResourceTypeConfig(r providers.ValidateResourceTypeConfigRequest) (resp providers.ValidateResourceTypeConfigResponse)
- type GRPCProviderFunc
- type GRPCProviderPlugin
- type GRPCProvisioner
- func (p *GRPCProvisioner) Close() error
- func (p *GRPCProvisioner) GetSchema() (resp provisioners.GetSchemaResponse)
- func (p *GRPCProvisioner) ProvisionResource(r provisioners.ProvisionResourceRequest) (resp provisioners.ProvisionResourceResponse)
- func (p *GRPCProvisioner) Stop() error
- func (p *GRPCProvisioner) ValidateProvisionerConfig(r provisioners.ValidateProvisionerConfigRequest) (resp provisioners.ValidateProvisionerConfigResponse)
- type GRPCProvisionerFunc
- type GRPCProvisionerPlugin
- type ServeOpts
- type UIInput
- type UIInputInputResponse
- type UIInputServer
- type UIOutput
- type UIOutputServer
Constants ¶
const ( // The constants below are the names of the plugins that can be dispensed // from the plugin server. ProviderPluginName = "provider" ProvisionerPluginName = "provisioner" // DefaultProtocolVersion is the protocol version assumed for legacy clients that don't specify // a particular version during their handshake. This is the version used when Terraform 0.10 // and 0.11 launch plugins that were built with support for both versions 4 and 5, and must // stay unchanged at 4 until we intentionally build plugins that are not compatible with 0.10 and // 0.11. DefaultProtocolVersion = 4 )
Variables ¶
var Handshake = plugin.HandshakeConfig{ ProtocolVersion: DefaultProtocolVersion, MagicCookieKey: "TF_PLUGIN_MAGIC_COOKIE", MagicCookieValue: "d602bf8f470bc67ca7faa0386276bbdd4330efaf76d1a219cb4d6991ca9872b2", }
Handshake is the HandshakeConfig used to configure clients and servers.
var VersionedPlugins = map[int]plugin.PluginSet{ 5: { "provider": &GRPCProviderPlugin{}, "provisioner": &GRPCProvisionerPlugin{}, }, }
Functions ¶
Types ¶
type GRPCProvider ¶ added in v0.12.0
type GRPCProvider struct { // PluginClient provides a reference to the plugin.Client which controls the plugin process. // This allows the GRPCProvider a way to shutdown the plugin process. PluginClient *plugin.Client // TestServer contains a grpc.Server to close when the GRPCProvider is being // used in an end to end test of a provider. TestServer *grpc.Server // contains filtered or unexported fields }
GRPCProvider handles the client, or core side of the plugin rpc connection. The GRPCProvider methods are mostly a translation layer between the terraform provioders types and the grpc proto types, directly converting between the two.
func (*GRPCProvider) ApplyResourceChange ¶ added in v0.12.0
func (p *GRPCProvider) ApplyResourceChange(r providers.ApplyResourceChangeRequest) (resp providers.ApplyResourceChangeResponse)
func (*GRPCProvider) Close ¶ added in v0.12.0
func (p *GRPCProvider) Close() error
closing the grpc connection is final, and terraform will call it at the end of every phase.
func (*GRPCProvider) Configure ¶ added in v0.12.0
func (p *GRPCProvider) Configure(r providers.ConfigureRequest) (resp providers.ConfigureResponse)
func (*GRPCProvider) GetSchema ¶ added in v0.12.0
func (p *GRPCProvider) GetSchema() (resp providers.GetSchemaResponse)
func (*GRPCProvider) ImportResourceState ¶ added in v0.12.0
func (p *GRPCProvider) ImportResourceState(r providers.ImportResourceStateRequest) (resp providers.ImportResourceStateResponse)
func (*GRPCProvider) PlanResourceChange ¶ added in v0.12.0
func (p *GRPCProvider) PlanResourceChange(r providers.PlanResourceChangeRequest) (resp providers.PlanResourceChangeResponse)
func (*GRPCProvider) PrepareProviderConfig ¶ added in v0.12.0
func (p *GRPCProvider) PrepareProviderConfig(r providers.PrepareProviderConfigRequest) (resp providers.PrepareProviderConfigResponse)
func (*GRPCProvider) ReadDataSource ¶ added in v0.12.0
func (p *GRPCProvider) ReadDataSource(r providers.ReadDataSourceRequest) (resp providers.ReadDataSourceResponse)
func (*GRPCProvider) ReadResource ¶ added in v0.12.0
func (p *GRPCProvider) ReadResource(r providers.ReadResourceRequest) (resp providers.ReadResourceResponse)
func (*GRPCProvider) Stop ¶ added in v0.12.0
func (p *GRPCProvider) Stop() error
func (*GRPCProvider) UpgradeResourceState ¶ added in v0.12.0
func (p *GRPCProvider) UpgradeResourceState(r providers.UpgradeResourceStateRequest) (resp providers.UpgradeResourceStateResponse)
func (*GRPCProvider) ValidateDataSourceConfig ¶ added in v0.12.0
func (p *GRPCProvider) ValidateDataSourceConfig(r providers.ValidateDataSourceConfigRequest) (resp providers.ValidateDataSourceConfigResponse)
func (*GRPCProvider) ValidateResourceTypeConfig ¶ added in v0.12.0
func (p *GRPCProvider) ValidateResourceTypeConfig(r providers.ValidateResourceTypeConfigRequest) (resp providers.ValidateResourceTypeConfigResponse)
type GRPCProviderFunc ¶ added in v0.12.0
type GRPCProviderFunc func() proto.ProviderServer
type GRPCProviderPlugin ¶ added in v0.12.0
type GRPCProviderPlugin struct { plugin.Plugin GRPCProvider func() proto.ProviderServer }
GRPCProviderPlugin implements plugin.GRPCPlugin for the go-plugin package.
func (*GRPCProviderPlugin) GRPCClient ¶ added in v0.12.0
func (p *GRPCProviderPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*GRPCProviderPlugin) GRPCServer ¶ added in v0.12.0
func (p *GRPCProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type GRPCProvisioner ¶ added in v0.12.0
type GRPCProvisioner struct { // PluginClient provides a reference to the plugin.Client which controls the plugin process. // This allows the GRPCProvider a way to shutdown the plugin process. PluginClient *plugin.Client // contains filtered or unexported fields }
provisioners.Interface grpc implementation
func (*GRPCProvisioner) Close ¶ added in v0.12.0
func (p *GRPCProvisioner) Close() error
func (*GRPCProvisioner) GetSchema ¶ added in v0.12.0
func (p *GRPCProvisioner) GetSchema() (resp provisioners.GetSchemaResponse)
func (*GRPCProvisioner) ProvisionResource ¶ added in v0.12.0
func (p *GRPCProvisioner) ProvisionResource(r provisioners.ProvisionResourceRequest) (resp provisioners.ProvisionResourceResponse)
func (*GRPCProvisioner) Stop ¶ added in v0.12.0
func (p *GRPCProvisioner) Stop() error
func (*GRPCProvisioner) ValidateProvisionerConfig ¶ added in v0.12.0
func (p *GRPCProvisioner) ValidateProvisionerConfig(r provisioners.ValidateProvisionerConfigRequest) (resp provisioners.ValidateProvisionerConfigResponse)
type GRPCProvisionerFunc ¶ added in v0.12.0
type GRPCProvisionerFunc func() proto.ProvisionerServer
type GRPCProvisionerPlugin ¶ added in v0.12.0
type GRPCProvisionerPlugin struct { plugin.Plugin GRPCProvisioner func() proto.ProvisionerServer }
GRPCProvisionerPlugin is the plugin.GRPCPlugin implementation.
func (*GRPCProvisionerPlugin) GRPCClient ¶ added in v0.12.0
func (p *GRPCProvisionerPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*GRPCProvisionerPlugin) GRPCServer ¶ added in v0.12.0
func (p *GRPCProvisionerPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
type ServeOpts ¶ added in v0.3.0
type ServeOpts struct { // Wrapped versions of the above plugins will automatically shimmed and // added to the GRPC functions when possible. GRPCProviderFunc GRPCProviderFunc GRPCProvisionerFunc GRPCProvisionerFunc }
ServeOpts are the configurations to serve a plugin.
type UIInput ¶ added in v0.7.0
UIInput is an implementation of terraform.UIInput that communicates over RPC.
type UIInputInputResponse ¶ added in v0.7.0
type UIInputInputResponse struct { Value string Error *plugin.BasicError }
type UIInputServer ¶ added in v0.7.0
UIInputServer is a net/rpc compatible structure for serving a UIInputServer. This should not be used directly.
func (*UIInputServer) Input ¶ added in v0.7.0
func (s *UIInputServer) Input( opts *terraform.InputOpts, reply *UIInputInputResponse) error
type UIOutput ¶ added in v0.7.0
UIOutput is an implementatin of terraform.UIOutput that communicates over RPC.
type UIOutputServer ¶ added in v0.7.0
UIOutputServer is the RPC server for serving UIOutput.
func (*UIOutputServer) Output ¶ added in v0.7.0
func (s *UIOutputServer) Output( v string, reply *interface{}) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_tfplugin5 is a generated GoMock package.
|
Package mock_tfplugin5 is a generated GoMock package. |