Documentation ¶
Overview ¶
Package deduplication provides middleware for FIFO queue handler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingDeduplicationID = errors.New("deduplication id is missing")
ErrMissingDeduplicationID is returned when the deduplication ID is missing from the message attributes.
Functions ¶
This section is empty.
Types ¶
type FifoDeduplicationMiddleware ¶
type FifoDeduplicationMiddleware struct {
// contains filtered or unexported fields
}
FifoDeduplicationMiddleware is a middleware that provides FIFO deduplication for messages.
func FifoMiddleware ¶
FifoMiddleware creates and returns a new instance of the FifoDeduplicationMiddleware.
type Storage ¶
type Storage interface { Save(ctx context.Context, deduplicationID string) error Exists(ctx context.Context, deduplicationID string) (bool, error) }
Storage is an interface for deduplication storage.
func NewDynamoDB ¶
func NewDynamoDB(db dynamodbiface.DynamoDBAPI, table string, ttl time.Duration) Storage
NewDynamoDB creates a new DynamoDB instance for deduplication storage. It takes a DynamoDBAPI instance, table name, and TTL duration as input and returns the created Storage instance.
Click to show internal directories.
Click to hide internal directories.