idempotency

package
v0.0.0-...-d707f67 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package idempotency implements methods to maintain idempotency with the commands received

Index

Constants

View Source
const (

	// Name represents idempotency name
	Name = "Idempotency"
)

Variables

This section is empty.

Functions

func CleanupOldIdempotencyEntries

func CleanupOldIdempotencyEntries(idemCtx context.T)

CleanupOldIdempotencyEntries deletes the commands in idempotency folder after persistenceTimeout minutes

func CreateIdempotencyDirectory

func CreateIdempotencyDirectory(idemCtx context.T)

CreateIdempotencyDirectory creates idempotency directory and logs warn message if could not be created This function passes if the directory is already present

func CreateIdempotencyEntry

func CreateIdempotencyEntry(idemCtx context.T, message *contracts.DocumentState) error

CreateIdempotencyEntry writes command id to the idempotency directory

func IsDocumentAlreadyReceived

func IsDocumentAlreadyReceived(idemCtx context.T, message *contracts.DocumentState) bool

IsDocumentAlreadyReceived checks whether the document was received already

Types

This section is empty.

Jump to

Keyboard shortcuts

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