bulk

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchItem

type BatchItem struct {
	Model mongodb.Model
	Bytes []byte
	Size  int
}

type Bulk

type Bulk struct {
	// contains filtered or unexported fields
}

func NewBulk

func NewBulk(cfg *config.Config, dcpCheckpointCommit func()) (*Bulk, error)

func (*Bulk) AddActions

func (b *Bulk) AddActions(ctx *models.ListenerContext, eventTime time.Time, actions []mongodb.Model)

func (*Bulk) Close

func (b *Bulk) Close()

func (*Bulk) GetMetric

func (b *Bulk) GetMetric() *Metric

func (*Bulk) LockMetrics

func (b *Bulk) LockMetrics()

func (*Bulk) StartBulk

func (b *Bulk) StartBulk()

func (*Bulk) UnlockMetrics

func (b *Bulk) UnlockMetrics()

type Metric

type Metric struct {
	InsertErrorCounter          map[string]int64
	UpdateSuccessCounter        map[string]int64
	UpdateErrorCounter          map[string]int64
	DeleteSuccessCounter        map[string]int64
	DeleteErrorCounter          map[string]int64
	ProcessLatencyMs            int64
	BulkRequestProcessLatencyMs int64
}

Jump to

Keyboard shortcuts

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