Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMongoInitialization = errors.New("failed to start mongo writer")
)
Functions ¶
func NewMongoDBWriter ¶
func NewMongoDBWriter[T entities.PipelineEvent](ctx context.Context, config *Config) (sinks.Sink[T], error)
NewMongoDBWriter will construct a new MongoDB writer and validate the connection parameters via a ping request.
Types ¶
type Config ¶
type Config struct {
URL config.SecretSource `json:"url"`
Collection string `json:"collection"`
InsertOnly bool `json:"insertOnly"`
Database string `json:"-"`
}
Config contains the configuration needed to connect to a remote MongoDB instance
type Writer ¶
type Writer[T entities.PipelineEvent] struct { // contains filtered or unexported fields }
Writer is a concrete implementation of a Writer that will save and delete data from a MongoDB instance.
Click to show internal directories.
Click to hide internal directories.