MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / EXPIREBYAT

Method EXPIREBYAT

structure/expiring_key.go:114–122  ·  view source on GitHub ↗
(key string, timestamp int64, tag ...string)

Source from the content-addressed store, hash-verified

112}
113
114func (ek *ExpireStructure) EXPIREBYAT(key string, timestamp int64, tag ...string) error {
115 if len(tag) == 0 {
116 return ek.setExpireToDB(key, timestamp*1000)
117 } else if len(tag) == 1 && tag[0] == "ex" {
118 return ek.setExpireToDB(key, ek.getCurrentMiliUnixTimeStamp()+timestamp*1000)
119 } else {
120 return ErrInvalidArgs
121 }
122}
123
124func (ek *ExpireStructure) PEXPIREBYAT(key string, timestamp int64, tag ...string) error {
125 if len(tag) == 0 {

Callers 1

Calls 2

setExpireToDBMethod · 0.95

Tested by 1