package
Version:
v0.0.0-...-a253b9f
Opens a new window with list of versions in this module.
Published: Apr 7, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Delete(key interface{})
Delete 删除KV中指定的元素
func Exists(key interface{}) bool
Exists 判断元素是否在集合中且未过期
func Get(key interface{}) interface{}
Get 获取KV中的指定元素
func Set(key interface{}, value interface{}, ttl time.Duration)
Set 往集合中添加元素
type Item struct {
Value interface{}
ExpireAt time.Time
}
Item 集合中的元素,包含值和过期时间
Source Files
¶
Click to show internal directories.
Click to hide internal directories.