Documentation ¶
Index ¶
- Variables
- func AcceptanceTest(t *testing.T, tdf testDispenserFunc)
- type DestinationPlugin
- type Dispenser
- type PluginService
- func (s *PluginService) Check(context.Context) error
- func (s *PluginService) Init(ctx context.Context, connUtilsAddr string, connUtilsToken string)
- func (s *PluginService) List(context.Context) (map[string]pconnector.Specification, error)
- func (s *PluginService) NewDispenser(logger log.CtxLogger, name string, connectorID string) (Dispenser, error)
- func (s *PluginService) ValidateDestinationConfig(ctx context.Context, name string, settings map[string]string) (err error)
- func (s *PluginService) ValidateSourceConfig(ctx context.Context, name string, settings map[string]string) (err error)
- type SourcePlugin
- type SpecifierPlugin
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStreamNotOpen = io.EOF
Functions ¶
func AcceptanceTest ¶ added in v0.11.0
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.
type PluginService ¶
type PluginService struct {
// contains filtered or unexported fields
}
func NewPluginService ¶
func NewPluginService( logger log.CtxLogger, builtin builtinReg, standalone standaloneReg, ) *PluginService
func (*PluginService) Init ¶ added in v0.11.0
func (s *PluginService) Init(ctx context.Context, connUtilsAddr string, connUtilsToken string)
func (*PluginService) List ¶
func (s *PluginService) List(context.Context) (map[string]pconnector.Specification, error)
func (*PluginService) NewDispenser ¶
func (*PluginService) ValidateDestinationConfig ¶
func (*PluginService) ValidateSourceConfig ¶
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. |
Click to show internal directories.
Click to hide internal directories.