redisdedupe

package
v1.0.0-beta.160 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package redisdedupe implements event deduplication using Redis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deduplicator

type Deduplicator struct {
	Redis      *redis.Client
	Expiration time.Duration
}

Deduplicator implements event deduplication using Redis.

func (Deduplicator) CheckUnique

func (d Deduplicator) CheckUnique(ctx context.Context, item dedupe.Item) (bool, error)

CheckUnique checks if the event is unique based on the key

func (Deduplicator) Close

func (d Deduplicator) Close() error

Close closes underlying redis client

func (Deduplicator) IsUnique

func (d Deduplicator) IsUnique(ctx context.Context, namespace string, ev event.Event) (bool, error)

IsUnique checks if an event is unique AND adds it to the deduplication index.

func (Deduplicator) Set

func (d Deduplicator) Set(ctx context.Context, items ...dedupe.Item) error

Set sets events into redis

Jump to

Keyboard shortcuts

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