dedupe

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deduplicator

type Deduplicator interface {
	// CheckAndMark returns true if the event was already seen (duplicate).
	// If not seen, it atomically marks the event as seen.
	CheckAndMark(ctx context.Context, eventID string) (isDuplicate bool, err error)

	Stats() map[string]int64

	// Close releases resources held by the deduplicator.
	Close() error
}

Deduplicator checks whether an event has been seen before and marks it.

type EmbeddedDeduplicator

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

EmbeddedDeduplicator uses Pebble for local deduplication.

func NewEmbedded

func NewEmbedded(dir string) (*EmbeddedDeduplicator, error)

NewEmbedded opens a Pebble database at the given path.

func (*EmbeddedDeduplicator) CheckAndMark

func (d *EmbeddedDeduplicator) CheckAndMark(_ context.Context, eventID string) (bool, error)

CheckAndMark returns true if the event was already seen.

func (*EmbeddedDeduplicator) Close

func (d *EmbeddedDeduplicator) Close() error

func (*EmbeddedDeduplicator) Stats

func (d *EmbeddedDeduplicator) Stats() map[string]int64

Jump to

Keyboard shortcuts

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