destination

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() sdk.Destination

New creates new instance of the Destination.

Types

type Config

type Config struct {
	config.Config
}

func (Config) Parameters

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

type Destination

type Destination struct {
	sdk.UnimplementedDestination
	// contains filtered or unexported fields
}

Destination SQL Server Connector persists records to a sql server database.

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

func (d *Destination) Parameters() map[string]sdk.Parameter

Parameters returns a map of named sdk.Parameters that describe how to configure the Destination.

func (*Destination) Teardown

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

Teardown gracefully closes connections.

func (*Destination) Write

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

Write writes a record into a Destination.

type Writer

type Writer interface {
	Delete(ctx context.Context, record sdk.Record) error
	Insert(ctx context.Context, record sdk.Record) error
	Update(ctx context.Context, record sdk.Record) error
	Close(ctx context.Context) error
}

Writer defines a writer interface needed for the Destination.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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