mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-11-03 10:21:00 +08:00
Updated keyspace methods' signatures and made them all private. Ditched lock-per-key for a store-wide rwmutex. Updated HandlerFuncParams to match new keyspace method signatures.
This commit is contained in:
@@ -59,18 +59,12 @@ type HandlerFuncParams struct {
|
||||
Context context.Context
|
||||
Command []string
|
||||
Connection *net.Conn
|
||||
KeyLock func(ctx context.Context, key string) (bool, error)
|
||||
KeyUnlock func(ctx context.Context, key string)
|
||||
KeyRLock func(ctx context.Context, key string) (bool, error)
|
||||
KeyRUnlock func(ctx context.Context, key string)
|
||||
KeyExists func(ctx context.Context, key string) bool
|
||||
CreateKeyAndLock func(ctx context.Context, key string) (bool, error)
|
||||
GetValue func(ctx context.Context, key string) interface{}
|
||||
SetValue func(ctx context.Context, key string, value interface{}) error
|
||||
GetExpiry func(ctx context.Context, key string) time.Time
|
||||
KeysExist func(keys []string) map[string]bool
|
||||
GetExpiry func(key string) time.Time
|
||||
DeleteKey func(key string) error
|
||||
GetValues func(ctx context.Context, keys []string) map[string]interface{}
|
||||
SetValues func(ctx context.Context, entries map[string]interface{}) error
|
||||
SetExpiry func(ctx context.Context, key string, expire time.Time, touch bool)
|
||||
RemoveExpiry func(ctx context.Context, key string)
|
||||
DeleteKey func(ctx context.Context, key string) error
|
||||
GetClock func() clock.Clock
|
||||
GetAllCommands func() []Command
|
||||
GetACL func() interface{}
|
||||
|
||||
Reference in New Issue
Block a user