init: hgmj server initial commit
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package cachev2
|
||||
|
||||
import "time"
|
||||
|
||||
// Driver 缓存驱动接口定义
|
||||
type Driver interface {
|
||||
IsExist(key string) bool
|
||||
Get(key string) (*string, error)
|
||||
Set(key string, value interface{}, expire time.Duration) error
|
||||
SetNX(key string, value interface{}, expiration time.Duration) (bool, error)
|
||||
ScanKeys(match string) (keys []string, err error)
|
||||
Del(keys ...string) (n int64, err error)
|
||||
Close() error
|
||||
}
|
||||
Reference in New Issue
Block a user