diff options
| author | alex <[email protected]> | 2026-07-06 14:38:56 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-06 14:38:56 +0200 |
| commit | 316b443addb7ec55e27f571ef489f2c19afb3a82 (patch) | |
| tree | b22dc242186b85b888cde0da002c8c95c0adcc99 /redisDB.go | |
| parent | 48df6e2f7c36a859e7d76de23017eef84452c0ed (diff) | |
| download | redis-clone-316b443addb7ec55e27f571ef489f2c19afb3a82.tar.xz redis-clone-316b443addb7ec55e27f571ef489f2c19afb3a82.zip | |
added struct Item and keyowrd EXPIRE so now we can track expire time of items in the db
Diffstat (limited to 'redisDB.go')
| -rw-r--r-- | redisDB.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3,11 +3,15 @@ package main import ( "fmt" "sync" + "time" ) - +type Item struct { + Value any + ExpiresAt *time.Time +} type RedisDB struct { mu sync.Mutex - data map[string]any + data map[string]Item } type SimpleString string |
