idempotency

package
v0.0.0-...-55c1add Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis[T any] struct {
	// contains filtered or unexported fields
}

func NewRedis

func NewRedis[T any](redisUrl string) (*Redis[T], error)

func (*Redis[T]) Start

func (r *Redis[T]) Start(ctx context.Context, idempotencyKey string) (T, bool, error)

Start returns the executed result and true if the idempotency key is already executed. Otherwise, returns empty T and false

func (*Redis[T]) Store

func (r *Redis[T]) Store(ctx context.Context, idempotencyKey string, value T) error

Jump to

Keyboard shortcuts

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