connector

package
v0.13.0-nightly.20241109 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStreamNotOpen = io.EOF

Functions

func AcceptanceTest added in v0.11.0

func AcceptanceTest(t *testing.T, tdf testDispenserFunc)

AcceptanceTest is the acceptance test that all implementations of plugins should pass. It should manually be called from a test case in each implementation:

func TestPlugin(t *testing.T) {
    testDispenser := func() {...}
    plugin.AcceptanceTest(t, testDispenser)
}

Types

type DestinationPlugin

type DestinationPlugin interface {
	pconnector.DestinationPlugin
	NewStream() pconnector.DestinationRunStream
}

type Dispenser

type Dispenser interface {
	DispenseSpecifier() (SpecifierPlugin, error)
	DispenseSource() (SourcePlugin, error)
	DispenseDestination() (DestinationPlugin, error)
}

Dispenser dispenses specifier, source and destination plugins.

func DispenserWithCleanup added in v0.11.0

func DispenserWithCleanup(d Dispenser, cleanup func()) Dispenser

type PluginService

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

func NewPluginService

func NewPluginService(
	logger log.CtxLogger,
	builtin builtinReg,
	standalone standaloneReg,
	tokenService *connutils.AuthManager,
) *PluginService

func (*PluginService) Check

func (s *PluginService) Check(context.Context) error

func (*PluginService) Init added in v0.11.0

func (s *PluginService) Init(ctx context.Context, connUtilsAddr string)

func (*PluginService) List

func (*PluginService) NewDispenser

func (s *PluginService) NewDispenser(logger log.CtxLogger, name string, connectorID string) (Dispenser, error)

func (*PluginService) ValidateDestinationConfig

func (s *PluginService) ValidateDestinationConfig(ctx context.Context, name string, settings map[string]string) (err error)

func (*PluginService) ValidateSourceConfig

func (s *PluginService) ValidateSourceConfig(ctx context.Context, name string, settings map[string]string) (err error)

type SourcePlugin

type SourcePlugin interface {
	pconnector.SourcePlugin
	NewStream() pconnector.SourceRunStream
}

type SpecifierPlugin

type SpecifierPlugin interface {
	pconnector.SpecifierPlugin
}

type ValidationError

type ValidationError struct {
	Err error
}

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error formats the error message.

func (*ValidationError) Is

func (e *ValidationError) Is(target error) bool

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap returns the underlying error.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
test/testplugin
Package main contains a plugin used for testing purposes.
Package main contains a plugin used for testing purposes.

Jump to

Keyboard shortcuts

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