server

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(
	specifierFactory func() pconnector.SpecifierPlugin,
	sourceFactory func() pconnector.SourcePlugin,
	destinationFactory func() pconnector.DestinationPlugin,
	opts ...Option,
) error

Serve starts a go-plugin server with the given factories for creating Specifier, Source, and Destination plugins. The server will support both v1 and v2 of the connector protocol.

Types

type Option

type Option interface {
	ApplyOption(*plugin.ServeConfig) error
}

Option is an interface for defining options that can be passed to the Serve function. Each implementation modifies the ServeConfig being generated. A slice of Options then, cumulatively applied, render a full ServeConfig.

func WithDebug

func WithDebug(ctx context.Context, config chan *plugin.ReattachConfig, closeCh chan struct{}) Option

WithDebug returns an Option that will set the server into debug mode, using the passed options to populate the go-plugin ServeTestConfig.

func WithGRPCServerOptions

func WithGRPCServerOptions(opt ...grpc.ServerOption) Option

Jump to

Keyboard shortcuts

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