storage

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MutexPrefix   = "mutex_"
	DefaultPrefix = "default:"
)

Variables

This section is empty.

Functions

func GetMutexName

func GetMutexName(key string) string

Types

type Aerospike

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

func NewAerospike

func NewAerospike(namespace string, setName string, client *aero.Client) *Aerospike

func (*Aerospike) Add

func (m *Aerospike) Add(group string, id string) error

func (*Aerospike) Delete

func (m *Aerospike) Delete(group string, id string) error

func (*Aerospike) DeleteByID

func (m *Aerospike) DeleteByID(id string) error

func (*Aerospike) GetIDs

func (m *Aerospike) GetIDs() []string

func (*Aerospike) GetKey

func (m *Aerospike) GetKey(group string, id string) string

func (*Aerospike) GetKeys

func (m *Aerospike) GetKeys(group string) []string

func (*Aerospike) Size

func (m *Aerospike) Size(group string) int

type Memory

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

func NewMemory

func NewMemory() *Memory

func (*Memory) Add

func (m *Memory) Add(group string, id string) error

func (*Memory) Delete

func (m *Memory) Delete(group string, id string) error

func (*Memory) DeleteByID

func (m *Memory) DeleteByID(id string) error

func (*Memory) GetIDs

func (m *Memory) GetIDs() []string

func (*Memory) GetKeys

func (m *Memory) GetKeys(group string) []string

func (*Memory) Size

func (m *Memory) Size(group string) int

type Redis

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

func NewRedis

func NewRedis(ctx context.Context, key string, conn *redis.Client) *Redis

func (*Redis) Add

func (s *Redis) Add(group string, id string) error

func (*Redis) Delete

func (s *Redis) Delete(group string, id string) error

func (*Redis) DeleteByID

func (s *Redis) DeleteByID(id string) error

func (*Redis) GetIDs

func (s *Redis) GetIDs() []string

func (*Redis) GetKeys

func (s *Redis) GetKeys(group string) []string

func (*Redis) LockOrWait

func (s *Redis) LockOrWait()

func (*Redis) Size

func (s *Redis) Size(group string) int

func (*Redis) TryLock

func (s *Redis) TryLock()

func (*Redis) TryUnlock

func (s *Redis) TryUnlock()

Jump to

Keyboard shortcuts

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