source

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func NewSource

func NewSource() sdk.Source

Types

type Config

type Config struct {
	config.Config
	// polling period for the CDC mode, formatted as a time.Duration string.
	PollingPeriod time.Duration `json:"pollingPeriod" default:"1s"`
}

Config represents source configuration with S3 configurations

func (Config) Parameters added in v0.4.0

func (Config) Parameters() map[string]sdk.Parameter

type Iterator

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

type Source

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

Source connector

func (*Source) Ack

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

func (*Source) Configure

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

Configure parses and stores the configurations returns an error in case of invalid config

func (*Source) Open

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

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

func (*Source) Parameters added in v0.3.0

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

func (*Source) Read

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

Read gets the next object from the S3 bucket

func (*Source) Teardown

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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