source

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSource

func NewSource() sdk.Source

NewSource returns an instance of sdk.Source

Types

type Iterator

type Iterator interface {
	HasNext() bool
	Next(ctx context.Context) (sdk.Record, error)
	Stop() error
}

type Source

type Source struct {
	sdk.UnimplementedSource
	// contains filtered or unexported fields
}

func (*Source) Ack

func (s *Source) Ack(ctx context.Context, position sdk.Position) error

Ack is called by the conduit server after the record has been successfully processed by all destination connectors

func (*Source) Configure

func (s *Source) Configure(ctx context.Context, cfg map[string]string) error

Configure validates the passed config and prepares the source connector

func (*Source) Open

func (s *Source) Open(ctx context.Context, position sdk.Position) error

Open prepare the plugin to start reading records from the given position

func (*Source) Parameters

func (s *Source) Parameters() map[string]sdk.Parameter

Parameters returns a map of named Parameters that describe how to configure the Source.

func (*Source) Read

func (s *Source) Read(ctx context.Context) (sdk.Record, error)

Read gets the next object

func (*Source) Teardown

func (s *Source) Teardown(_ context.Context) error

Teardown is called by the conduit server to stop the source connector all the cleanup should be done in this function

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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