Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOutput ¶
func NewOutput(conf output.MongoDBConfig, mgr bundle.NewManagement, log log.Modular, stats metrics.Type) (ioutput.Streamed, error)
NewOutput creates a new MongoDB output type.
func NewProcessor ¶
func NewProcessor( conf processor.Config, mgr bundle.NewManagement, log log.Modular, stats metrics.Type, ) (iprocessor.V2Batched, error)
NewProcessor returns a MongoDB processor.
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor stores or retrieves data from a mongo db for each message of a batch
func (*Processor) ProcessBatch ¶
func (m *Processor) ProcessBatch(ctx context.Context, spans []*tracing.Span, batch *message.Batch) ([]*message.Batch, error)
ProcessBatch applies the processor to a message batch, either creating >0 resulting messages or a response to be sent back to the message source.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a benthos writer.Type implementation that writes messages to an Writer database.
func NewWriter ¶
func NewWriter( mgr bundle.NewManagement, conf output.MongoDBConfig, log log.Modular, stats metrics.Type, ) (*Writer, error)
NewWriter creates a new MongoDB writer.Type.
func (*Writer) CloseAsync ¶
func (m *Writer) CloseAsync()
CloseAsync begins cleaning up resources used by this writer asynchronously.
func (*Writer) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to the target mongo DB
func (*Writer) WaitForClose ¶
WaitForClose will block until either the writer is closed or a specified timeout occurs.