sinks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Mongo = "mongo"

	// Fake is a fake writer used for testing purposes
	Fake = "fake"
)

Variables

View Source
var (
	ErrEmptyID = errors.New("id is empty")
)

Functions

This section is empty.

Types

type DataWithIdentifier

type DataWithIdentifier interface {
	GetID() string
	Operation() entities.Operation
}

type Sink

type Sink[Data DataWithIdentifier] interface {
	// WriteData will save the Data to the destination configured in the Writer.
	// Data will have the operation to perform (write, delete) and the data to save,
	// which can be used based on the sink type.
	WriteData(ctx context.Context, data Data) error
}

Sink interface abstract the implementation of an integration pipeline target. The concrete implementation has to know how to write and delete a Data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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