cachelock

package
v4.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cachelock

Laravel yyds!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabaseLock

func NewDatabaseLock(lottery [2]int, dbFunc func() *gorm.DB) contracts.Locker

func NewMemoryLock

func NewMemoryLock(lottery [2]int, s *MemStore) contracts.Locker

Types

type MemItem added in v4.19.7

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

type MemStore added in v4.19.7

type MemStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMemStore

func NewMemStore() *MemStore

func (*MemStore) Add added in v4.19.7

func (s *MemStore) Add(key string, i *MemItem)

func (*MemStore) Count added in v4.19.7

func (s *MemStore) Count() int

func (*MemStore) Delete added in v4.19.7

func (s *MemStore) Delete(key string)

func (*MemStore) Get added in v4.19.7

func (s *MemStore) Get(key string) *MemItem

func (*MemStore) Range added in v4.19.7

func (s *MemStore) Range(fn func(string, *MemItem, map[string]*MemItem))

func (*MemStore) Update added in v4.19.7

func (s *MemStore) Update(key string, m *MemItem)

Jump to

Keyboard shortcuts

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