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 initialises a new source.

Types

type Iterator

type Iterator interface {
	Next() (sdk.Record, error)
}

An Iterator defines the interface to iterator methods.

type Source

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

A Source represents the source connector.

func (*Source) Ack

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

Ack does nothing.

func (*Source) Configure

func (s *Source) Configure(_ context.Context, cfgRaw map[string]string) (err error)

Configure parses and stores configurations, returns an error in case of invalid configuration.

func (*Source) Open

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

Open parses sdk.Position and initializes a SnapshotIterator iterator.

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(_ context.Context) (sdk.Record, error)

Read returns the next sdk.Record.

func (*Source) Teardown

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

Teardown closes any connections which were previously connected from previous requests.

Directories

Path Synopsis
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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