plugins

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Handshake = plugin.HandshakeConfig{
		ProtocolVersion:  1,
		MagicCookieKey:   "TF_POLICY_PLUGIN",
		MagicCookieValue: "95ADAEF3D8C4",
	}
)

Functions

func CallFunction

func CallFunction(name string, args ...cty.Value) (cty.Value, error)

CallFunction calls the function with the given name and arguments. This is mainly used for testing.

func NewLogger

func NewLogger(plugin string) hclog.Logger

func RegisterFunction

func RegisterFunction(name string, fn interface{})

RegisterFunction registers a Go function with the given name.

func RegisterFunctionDirect

func RegisterFunctionDirect(name string, fn function.Function)

RegisterFunctionDirect registers a cty function with the given name.

func Serve

func Serve()

Types

type GrpcServer

type GrpcServer struct{}

func (*GrpcServer) ExecuteFunction

type PluginServer

type PluginServer struct {
	plugin.NetRPCUnsupportedPlugin
}

func (*PluginServer) GRPCClient

func (p *PluginServer) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, conn *grpc.ClientConn) (interface{}, error)

func (*PluginServer) GRPCServer

func (p *PluginServer) GRPCServer(_ *plugin.GRPCBroker, server *grpc.Server) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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