redis

package
v0.0.0-...-65d01b3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cacher

type Cacher interface {
	Shutdown(ctx context.Context)
	Get(ctx context.Context, key string) ([]byte, error)
	Set(ctx context.Context, key string, val []byte) error
	SetWithExpiry(ctx context.Context, key string, val []byte, expiry time.Duration) error
	Delete(ctx context.Context, key string) error
	Publish(ctx context.Context, channelName string, binary []byte) error
	Subscribe(ctx context.Context, channelName string) RedisSubscriber
	GetRedisClient() redis.UniversalClient
}

func NewCache

func NewCache(cfg *c.Configuration, logger *slog.Logger) Cacher

type RedisSubscriber

type RedisSubscriber interface {
	WaitUntilReceiveMessage(ctx context.Context) ([]byte, error)
	Close() error
}

Jump to

Keyboard shortcuts

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