cachekit

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisCache

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

func NewRedisCache

func NewRedisCache(ctx context.Context, options ...RedisOption) (*RedisCache, error)

func (*RedisCache) Client

func (r *RedisCache) Client() *redis.Client

func (*RedisCache) Delete

func (r *RedisCache) Delete(ctx context.Context, key string) error

func (*RedisCache) Exists

func (r *RedisCache) Exists(ctx context.Context, key string) (bool, error)

func (*RedisCache) Get

func (r *RedisCache) Get(ctx context.Context, key string) (string, error)

func (*RedisCache) HealthChecks added in v0.1.1

func (r *RedisCache) HealthChecks() []healthkit.Check

func (*RedisCache) Name

func (r *RedisCache) Name() string

func (*RedisCache) Ready

func (r *RedisCache) Ready() <-chan struct{}

func (*RedisCache) Set

func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

func (*RedisCache) Start

func (r *RedisCache) Start(ctx context.Context) error

func (*RedisCache) Stop

func (r *RedisCache) Stop(ctx context.Context) error

type RedisOption

type RedisOption func(*RedisCache)

func WithAddress

func WithAddress(addr string) RedisOption

func WithDB

func WithDB(db int) RedisOption

func WithName

func WithName(name string) RedisOption

func WithPassword

func WithPassword(password string) RedisOption

Jump to

Keyboard shortcuts

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