common

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

This section is empty.

Variables

This section is empty.

Functions

func NewEndpointResolver added in v0.2.0

func NewEndpointResolver(urlStr string) (sqs.EndpointResolverV2, error)

func NewSQSClient added in v0.2.0

func NewSQSClient(ctx context.Context, httpClient *http.Client, cfg Config) (*sqs.Client, error)

Types

type Config

type Config struct {
	// AWSAccessKeyID is the amazon access key id
	AWSAccessKeyID string `json:"aws.accessKeyId" validate:"required"`
	// AWSSecretAccessKey is the amazon secret access key
	AWSSecretAccessKey string `json:"aws.secretAccessKey" validate:"required"`
	// AWSRegion is the amazon sqs region
	AWSRegion string `json:"aws.region" validate:"required"`
	// AWSURL is the URL for AWS (internal use only).
	AWSURL string `json:"aws.url"`
}

type EndpointResolver added in v0.2.0

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

EndpointResolver sets a custom endpoint for the sqs client. It satisfies the sqs.EndpointResolverV2 interface.

func (*EndpointResolver) ResolveEndpoint added in v0.2.0

type Position added in v0.2.0

type Position struct {
	ReceiptHandle string `json:"receipt_handle"`
	QueueName     string `json:"queue_name"`
}

func ParsePosition added in v0.2.0

func ParsePosition(sdkPosition opencdc.Position) (Position, error)

func (Position) ToSdkPosition added in v0.2.0

func (p Position) ToSdkPosition() opencdc.Position

Jump to

Keyboard shortcuts

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