plugin

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID = "saturn-sync-plugin"
)

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "SATURN_SYNC_MAGIC_COOKIE",
	MagicCookieValue: "9P59IdZaEoZpENXXY2SHuvjczxUVHJaVhGG8RgeIVXfPx6c5wt34g6NLtRNehFT6",
}
View Source
var PluginMap = map[string]plugin.Plugin{
	ID: &ProviderPlugin{},
}

Functions

This section is empty.

Types

type Provider

Provider defines the methods to call remote code via go-plugin.

type ProviderGrpcClient

type ProviderGrpcClient struct {
	// contains filtered or unexported fields
}

func (*ProviderGrpcClient) ExecuteActions

func (*ProviderGrpcClient) ExecuteFilters

func (*ProviderGrpcClient) GetPlugin added in v0.2.0

func (*ProviderGrpcClient) OnPrClosed

func (*ProviderGrpcClient) OnPrCreated

func (*ProviderGrpcClient) OnPrMerged

type ProviderGrpcServer

type ProviderGrpcServer struct {
	proto.UnimplementedPluginServiceServer
	Impl Provider
}

func (*ProviderGrpcServer) ExecuteActions

func (*ProviderGrpcServer) ExecuteFilters

func (*ProviderGrpcServer) GetPlugin added in v0.2.0

func (*ProviderGrpcServer) OnPrClosed

func (*ProviderGrpcServer) OnPrCreated

func (*ProviderGrpcServer) OnPrMerged

type ProviderPlugin

type ProviderPlugin struct {
	plugin.Plugin
	Impl Provider
}

ProviderPlugin is the bridge between custom code and go-plugin.

func (*ProviderPlugin) GRPCClient

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

GRPCClient implements GRPCPlugin. https://github.com/hashicorp/go-plugin/blob/8d2aaa458971cba97c3bfec1b0380322e024b514/plugin.go#L36C6-L36C16

func (*ProviderPlugin) GRPCServer

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

GRPCServer implements GRPCPlugin. https://github.com/hashicorp/go-plugin/blob/8d2aaa458971cba97c3bfec1b0380322e024b514/plugin.go#L36C6-L36C16

Jump to

Keyboard shortcuts

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