redis

package
v2.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

Checker provides inmemory messages test

func New

func New(client redis.Cmdable, lifetime time.Duration) *Checker

New checker wraps bigcache

func NewByURL added in v2.2.0

func NewByURL(url string, lifetime time.Duration) (*Checker, error)

NewByURL returns checker by redis URL redis://[:password]@host:port/db?max_idle=3&max_active=5&idle_timeout=240s

func (*Checker) IsSkip

func (ch *Checker) IsSkip(ctx context.Context, msg any) bool

IsSkip message if was sent

func (*Checker) MarkAsSent

func (ch *Checker) MarkAsSent(ctx context.Context, msg any) error

MarkAsSent message to the publisher

Jump to

Keyboard shortcuts

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