destination

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: 5 Imported by: 1

Documentation

Index

Constants

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]sdk.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(_ context.Context, cfg map[string]string) 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() map[string]sdk.Parameter

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 []sdk.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