destination

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigConnectionName          = "connectionName"
	ConfigCredentialsFilePath     = "credentialsFilePath"
	ConfigMaxReconnects           = "maxReconnects"
	ConfigNkeyPath                = "nkeyPath"
	ConfigReconnectWait           = "reconnectWait"
	ConfigSubject                 = "subject"
	ConfigTlsClientCertPath       = "tls.clientCertPath"
	ConfigTlsClientPrivateKeyPath = "tls.clientPrivateKeyPath"
	ConfigTlsRootCACertPath       = "tls.rootCACertPath"
	ConfigUrls                    = "urls"
)

Variables

This section is empty.

Functions

func NewDestination

func NewDestination() sdk.Destination

NewDestination creates new instance of the Destination.

Types

type Config added in v0.4.0

type Config struct {
	common.Config
}

func (Config) Parameters added in v0.4.0

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

type Destination

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

Destination NATS Connector sends records to a NATS subject.

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(context.Context) error

Open makes sure everything is prepared to receive records.

func (*Destination) Parameters

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

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

func (*Destination) Teardown

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

Teardown gracefully closes connections.

func (*Destination) Write

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

Write writes a record into a Destination.

type Writer

type Writer interface {
	Write(record opencdc.Record) error
	Close() error
}

Writer defines a writer interface needed for the Destination.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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