source

package
v0.2.0-nightly.20220209 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigKeyPollingPeriod is the config name for the S3 CDC polling period
	ConfigKeyPollingPeriod = "polling-period"

	// DefaultPollingPeriod is the value assumed for the pooling period when the
	// config omits the polling period parameter
	DefaultPollingPeriod = "1s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	config.Config
	PollingPeriod time.Duration
}

Config represents source configuration with S3 configurations

func Parse

func Parse(cfg map[string]string) (Config, error)

Parse attempts to parse plugins.Config into a Config struct that Source could utilize

type Iterator

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

type Source

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

Source connector

func (*Source) Ack

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

func (*Source) Open

func (s *Source) Open(ctx context.Context, cfg plugins.Config) error

Open parses and initializes the config and makes sure everything is prepared to read records.

func (*Source) Read

func (s *Source) Read(ctx context.Context, rp record.Position) (record.Record, error)

Read gets an object from s3 bucket according to the position.

func (*Source) Teardown

func (s *Source) Teardown() error

func (*Source) Validate

func (s *Source) Validate(cfg plugins.Config) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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