bootstrap

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientHandshakeConfig

func ClientHandshakeConfig(pluginClient api.PluginClient) goplugin.HandshakeConfig

ClientHandshakeConfig returns the handshake configuration for the given client implementation.

func Deinit

func Deinit(ctx context.Context, conn grpc.ClientConnInterface) error

Deinit deinitializes the plugin. It should only be called right before the host unloads the plugin and will not be invoking any other plugin or service RPCs.

func Init

func Init(ctx context.Context, conn grpc.ClientConnInterface, hostServiceNames []string) (pluginServiceNames []string, err error)

Init initializes the plugin and advertises the given host service names to the plugin for brokering. The list of service names implemented by the plugin are returned. This function is only intended to be used internally.

func NewLogger

func NewLogger() hclog.Logger

NewLogger returns a new default logger that emits logs in a format.

func Register added in v0.2.0

func Register(s *grpc.Server, servers []api.ServiceServer, logger hclog.Logger, dialer HostDialer)

register given servers with the gRPC server. The given dialer and logger will be used when the plugins are initialized.

func Serve

func Serve(
	opts ...pluginoption.ServerOption,
) error

Serve serves the plugin with the given loggers and plugin/service servers and an optional test configuration.

func ServerHandshakeConfig

func ServerHandshakeConfig(pluginServer api.PluginServer) goplugin.HandshakeConfig

ServerHandshakeConfig returns the handshake configuration for the given server implementation.

func ValidationUnaryInterceptor added in v0.9.3

func ValidationUnaryInterceptor(v protovalidate.Validator, request, response bool) grpc.UnaryServerInterceptor

Types

type HostDialer

type HostDialer interface {
	DialHost(ctx context.Context) (grpc.ClientConnInterface, error)
}

HostDialer is a generic interface for dialing the host. This interface is only intended to be used internally.

Jump to

Keyboard shortcuts

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