plugin6

package
v0.0.0-...-dbb8265 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCProvider

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

	// Addr uniquely identifies the type of provider.
	// Normally executed providers will have this set during initialization,
	// but it may not always be available for alternative execute modes.
	Addr addrs.Provider
	// 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 providers types and the grpc proto types, directly converting between the two.

func (*GRPCProvider) Close

func (p *GRPCProvider) Close() error

closing the grpc connection is final, and terraform will call it at the end of every phase.

func (*GRPCProvider) ConfigureProvider

func (*GRPCProvider) GetProviderSchema

func (p *GRPCProvider) GetProviderSchema() (resp providers.GetProviderSchemaResponse)

func (*GRPCProvider) ReadDataSource

func (*GRPCProvider) Stop

func (p *GRPCProvider) Stop() error

type GRPCProviderPlugin

type GRPCProviderPlugin struct {
	plugin.Plugin
	GRPCProvider func() proto6.ProviderServer
}

GRPCProviderPlugin implements plugin.GRPCPlugin for the go-plugin package.

func (*GRPCProviderPlugin) GRPCClient

func (p *GRPCProviderPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*GRPCProviderPlugin) GRPCServer

func (p *GRPCProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL