Documentation
¶
Index ¶
- Variables
- func CallFunction(name string, args ...cty.Value) (cty.Value, error)
- func NewLogger(plugin string) hclog.Logger
- func RegisterFunction(name string, fn interface{})
- func RegisterFunctionDirect(name string, fn function.Function)
- func Serve()
- type GrpcServer
- func (g *GrpcServer) ExecuteFunction(_ context.Context, request *proto.ExecuteFunctionRequest) (*proto.ExecuteFunctionResponse, error)
- func (g *GrpcServer) ListFunctions(context.Context, *proto.ListFunctionsRequest) (*proto.ListFunctionsResponse, error)
- func (g *GrpcServer) Setup(context.Context, *proto.PluginSetupRequest) (*proto.PluginSetupResponse, error)
- type PluginServer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "TF_POLICY_PLUGIN",
MagicCookieValue: "95ADAEF3D8C4",
}
)
Functions ¶
func CallFunction ¶
CallFunction calls the function with the given name and arguments. This is mainly used for testing.
func RegisterFunction ¶
func RegisterFunction(name string, fn interface{})
RegisterFunction registers a Go function with the given name.
func RegisterFunctionDirect ¶
RegisterFunctionDirect registers a cty function with the given name.
Types ¶
type GrpcServer ¶
type GrpcServer struct{}
func (*GrpcServer) ExecuteFunction ¶
func (g *GrpcServer) ExecuteFunction(_ context.Context, request *proto.ExecuteFunctionRequest) (*proto.ExecuteFunctionResponse, error)
func (*GrpcServer) ListFunctions ¶
func (g *GrpcServer) ListFunctions(context.Context, *proto.ListFunctionsRequest) (*proto.ListFunctionsResponse, error)
func (*GrpcServer) Setup ¶
func (g *GrpcServer) Setup(context.Context, *proto.PluginSetupRequest) (*proto.PluginSetupResponse, error)
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
Click to show internal directories.
Click to hide internal directories.