source

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigAwsAccessKeyId       = "aws.accessKeyId"
	ConfigAwsQueue             = "aws.queue"
	ConfigAwsRegion            = "aws.region"
	ConfigAwsSecretAccessKey   = "aws.secretAccessKey"
	ConfigAwsUrl               = "aws.url"
	ConfigAwsVisibilityTimeout = "aws.visibilityTimeout"
	ConfigAwsWaitTimeSeconds   = "aws.waitTimeSeconds"
)

Variables

This section is empty.

Functions

func NewSource

func NewSource() sdk.Source

Types

type Config

type Config struct {
	common.Config

	// QueueName is the sqs queue name
	QueueName string `json:"aws.queue" validate:"required"`

	// VisibilityTimeout is the duration (in seconds) that the received messages
	// are hidden from subsequent reads after being retrieved.
	VisibilityTimeout int32 `json:"aws.visibilityTimeout"`

	// WaitTimeSeconds is the duration (in seconds) for which the call waits for
	// a message to arrive in the queue before returning.
	WaitTimeSeconds int32 `json:"aws.waitTimeSeconds" default:"10"`
}

func (Config) Parameters

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

type Source

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

func (*Source) Ack

func (s *Source) Ack(ctx context.Context, sdkPos opencdc.Position) error

func (*Source) Configure

func (s *Source) Configure(ctx context.Context, cfg config.Config) error

func (*Source) Open

func (s *Source) Open(ctx context.Context, sdkPos opencdc.Position) (err error)

func (*Source) Parameters

func (s *Source) Parameters() config.Parameters

func (*Source) Read

func (s *Source) Read(ctx context.Context) (rec opencdc.Record, err error)

func (*Source) Teardown

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

Jump to

Keyboard shortcuts

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