redis

package
v0.0.0-...-3778cc8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotFound = errors.New("key not found")

Functions

This section is empty.

Types

type Service

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

func New

func New(ctx context.Context, cfg config.Redis) (Service, error)

func (Service) Close

func (s Service) Close()

func (Service) Delete

func (s Service) Delete(ctx context.Context, key string) error

func (Service) Get

func (s Service) Get(ctx context.Context, key string) (string, error)

func (Service) Ping

func (s Service) Ping(ctx context.Context) error

func (Service) SAdd

func (s Service) SAdd(ctx context.Context, key string, members ...any) error

func (Service) SIsMember

func (s Service) SIsMember(ctx context.Context, key string, member any) (bool, error)

func (Service) SMembers

func (s Service) SMembers(ctx context.Context, key string) ([]string, error)

func (Service) SRem

func (s Service) SRem(ctx context.Context, key string, members ...any) error

func (Service) Set

func (s Service) Set(ctx context.Context, key, value string, ttl time.Duration) error

func (Service) SetNX

func (s Service) SetNX(ctx context.Context, key, value string, ttl time.Duration) (bool, error)

Jump to

Keyboard shortcuts

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