plugin

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0, BSD-3-Clause Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const DefaultProviderPluginVersion = 1
View Source
const ProviderPluginName = "provider"

Variables

View Source
var Handshake = plugin.HandshakeConfig{

	MagicCookieKey:   "KF_PLUGIN_MAGIC_COOKIE",
	MagicCookieValue: "d602bf8f470bc67ca7faa0386276bbdd4330efaf76d1a219cb4d6991ca9872b2",
}

Handshake is the HandshakeConfig used to configure clients and servers.

VersionedPlugins includes both protocol 5 and 6 because this is the function called in providerFactory (command/meta_providers.go) to set up the initial plugin client config.

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
	// 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) Capabilities

func (*GRPCProvider) Close

func (r *GRPCProvider) Close(ctx context.Context)

func (*GRPCProvider) Configure

func (*GRPCProvider) ReadResource

func (*GRPCProvider) StopProvider

type GRPCProviderPlugin

type GRPCProviderPlugin struct {
	plugin.Plugin
	GRPCProvider func() kfplugin1.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

Jump to

Keyboard shortcuts

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