1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-07-30 23:43:18 +08:00
parent cb40e98104
commit 72943d78a9
2 changed files with 7 additions and 1 deletions

View File

@ -163,6 +163,12 @@ func StatusHashAction(arg ...Any) ice.Actions {
func ClearOnExitHashAction() ice.Actions {
return ice.MergeActions(ice.Actions{ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { Conf(m, m.PrefixKey(), HASH, "") }}})
}
func ExportHashAction() ice.Actions {
return ice.Actions{
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { HashImport(m, arg) }},
ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { HashExport(m, arg) }},
}
}
func HashKey(m *ice.Message) string {
if m.Option(HASH) != "" {

View File

@ -21,7 +21,7 @@ func init() {
mdb.MODIFY: {Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(mdb.MODIFY, m.PrefixKey(), kit.KeyHash(m.Option(mdb.ZONE)), mdb.HASH, m.OptionSimple(mdb.HASH), arg)
}},
}, ctx.CmdAction(), mdb.HashAction(mdb.SHORT, mdb.ZONE, mdb.FIELD, "time,zone", mdb.FIELDS, "time,hash,space,index,args,prev,from,status")), Hand: func(m *ice.Message, arg ...string) {
}, ctx.CmdAction(), mdb.ExportHashAction(), mdb.HashAction(mdb.SHORT, mdb.ZONE, mdb.FIELD, "time,zone", mdb.FIELDS, "time,hash,space,index,args,prev,from,status")), Hand: func(m *ice.Message, arg ...string) {
if arg = kit.Slice(arg, 0, 2); len(arg) == 0 || arg[0] == "" {
mdb.HashSelect(m)
} else {