destination

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ConfigAwsAccessKeyId     = "aws.accessKeyId"
	ConfigAwsBucket          = "aws.bucket"
	ConfigAwsRegion          = "aws.region"
	ConfigAwsSecretAccessKey = "aws.secretAccessKey"
	ConfigFormat             = "format"
	ConfigPrefix             = "prefix"
)
View Source
const (
	// ConfigKeyFormat is the config name for destination format.
	ConfigKeyFormat = "format"
)

Variables

This section is empty.

Functions

func NewDestination

func NewDestination() sdk.Destination

Types

type Config

type Config struct {
	config.Config
	// the destination format, either "json" or "parquet".
	Format format.Format `validate:"required,inclusion=parquet|json"`
}

Config represents S3 configuration with Destination specific configurations

func (Config) Parameters added in v0.4.0

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

type Destination

type Destination struct {
	sdk.UnimplementedDestination

	Config Config
	Writer writer.Writer
}

Destination S3 Connector persists records to an S3 storage. The records are usually buffered and written in batches for performance reasons. The buffer size is determined by config.

func (*Destination) Configure

func (d *Destination) Configure(ctx context.Context, cfg config.Config) error

Configure parses and initializes the config.

func (*Destination) Open

func (d *Destination) Open(ctx context.Context) error

Open makes sure everything is prepared to receive records.

func (*Destination) Parameters added in v0.3.0

func (d *Destination) Parameters() config.Parameters

func (*Destination) Teardown

func (d *Destination) Teardown(_ context.Context) error

Teardown gracefully disconnects the client

func (*Destination) Write added in v0.3.0

func (d *Destination) Write(ctx context.Context, records []opencdc.Record) (int, error)

Write writes a slice of records into a Destination.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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