mirror of
https://2025-dev.shylinux.com/x/20250215-cluster
synced 2025-04-25 13:18:05 +08:00
opt some
This commit is contained in:
parent
74adc00902
commit
96178dfff5
@ -1,5 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "shylinux.com/x/ice"
|
import "shylinux.com/x/ice"
|
||||||
|
import _ "2025-dev.shylinux.com/x/20250215-cluster/src/travel"
|
||||||
|
|
||||||
func main() { print(ice.Run()) }
|
func main() { print(ice.Run()) }
|
34
src/travel/travel.go
Normal file
34
src/travel/travel.go
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package travel
|
||||||
|
|
||||||
|
import (
|
||||||
|
"shylinux.com/x/ice"
|
||||||
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
|
"shylinux.com/x/icebergs/base/nfs"
|
||||||
|
"shylinux.com/x/icebergs/base/web"
|
||||||
|
)
|
||||||
|
|
||||||
|
type travel struct {
|
||||||
|
ice.Hash
|
||||||
|
list string `name:"list hash auto" help:"travel"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s travel) MachineMonitor(m *ice.Message, arg ...string) {
|
||||||
|
m.Cmd("").Table(func(value ice.Maps) {
|
||||||
|
switch value[nfs.MODULE] {
|
||||||
|
case "2025-dev.shylinux.com/x/20250215-cluster":
|
||||||
|
m.Cmdy(web.SPACE, value[mdb.NAME], m.PrefixKey(), m.ActionKey())
|
||||||
|
case "2025-dev.shylinux.com/x/20250213-machine":
|
||||||
|
m.Cmdy(web.SPACE, value[mdb.NAME], "web.chat.dev.machine.monitor")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
func (s travel) ServiceMonitor(m *ice.Message, arg ...string) {
|
||||||
|
}
|
||||||
|
func (s travel) List(m *ice.Message, arg ...string) {
|
||||||
|
m.Cmd(web.SPACE, ice.OPS, web.DREAM, web.SERVER).Table(func(value ice.Maps) {
|
||||||
|
m.PushRecord(value, "time,name,module,version")
|
||||||
|
})
|
||||||
|
m.Action(s.MachineMonitor, s.ServiceMonitor)
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { ice.Cmd("web.chat.dev.cluster.travel", travel{}) }
|
Loading…
x
Reference in New Issue
Block a user