dependencyresolver

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginGRPCMaxRetry = 3
	BackoffDuration    = 200 * time.Millisecond
)

Variables

View Source
var (
	// Handshake is used to just do a basic Handshake between
	// a plugin and host. If the Handshake fails, a user friendly error is shown.
	// This prevents users from executing bad plugins or executing a plugin
	// directory. It is a UX feature, not a security feature.
	Handshake = hplugin.HandshakeConfig{

		ProtocolVersion: protocolVersion,

		MagicCookieKey:   magicCookieKey,
		MagicCookieValue: magicCookieValue,
	}
)

Functions

func Serve

func Serve(t oplugin.DependencyResolverMod, logger hclog.Logger)

Types

type Connector

type Connector struct {
	plugin.NetRPCUnsupportedPlugin
	plugin.GRPCPlugin
	// contains filtered or unexported fields
}

func NewPlugin

func NewPlugin(impl oplugin.DependencyResolverMod, logger hclog.Logger) *Connector

func NewPluginClient

func NewPluginClient(logger hclog.Logger) *Connector

func (*Connector) GRPCClient

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

func (*Connector) GRPCServer

func (p *Connector) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error

type GRPCClient

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

GRPCClient will be used by core to talk over grpc with plugins

func (*GRPCClient) CompileAssets

func (*GRPCClient) GenerateDependencies

func (*GRPCClient) GenerateDestination

func (*GRPCClient) GetName

func (m *GRPCClient) GetName(ctx context.Context) (string, error)

type GRPCServer

type GRPCServer struct {
	// This is the real implementation coming from plugin
	Impl plugin.DependencyResolverMod

	pbp.UnimplementedDependencyResolverModServiceServer
}

GRPCServer will be used by plugins this is working as proto adapter

func (*GRPCServer) CompileAssets

func (*GRPCServer) GenerateDependencies

func (*GRPCServer) GenerateDestination

func (*GRPCServer) GetName

Jump to

Keyboard shortcuts

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