Documentation
¶
Index ¶
Constants ¶
View Source
const ( OneSecond = 1 OneMinute = 60 * OneSecond OneHour = 60 * OneMinute OneDay = OneHour * 24 )
Variables ¶
View Source
var (
ErrNotFound = fmt.Errorf("the key not found")
)
Functions ¶
func StreamToObject ¶
Types ¶
type Client ¶
type Client interface { Set(key string, v any, ttl int) error //ttl==0 ,永不过期 SetAsJson(key string, v any, ttl int) error AcquireLock(key string, ttl int) (bool, error) ReleaseLock(key string) error Get(key string, v any) error GetFromJson(key string, v any) error Del(key string) error Exist(key string) (bool, error) RemainingTTL(key string) (int64, error) Expire(key string, ttl int) error Conn() error }
Click to show internal directories.
Click to hide internal directories.