kvs

package
v0.0.0-...-46fdcb5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 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 KVS

type KVS[T any] struct {
	Client *redis.Client
}

func (*KVS[T]) Del

func (kvs *KVS[T]) Del(ctx context.Context, key string) error

func (*KVS[T]) Get

func (kvs *KVS[T]) Get(ctx context.Context, key string) (T, error)

func (*KVS[T]) Set

func (kvs *KVS[T]) Set(ctx context.Context, key string, value T, ttl time.Duration) error

type KVSFactory

type KVSFactory[T any] interface {
	Of(*redis.Client) (*KVS[T], error)
}

Jump to

Keyboard shortcuts

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