MCPcopy Create free account
hub / github.com/devfeel/dotweb / showQuery

Function showQuery

dotweb_sysgroup.go:92–102  ·  view source on GitHub ↗

query server information

(ctx Context)

Source from the content-addressed store, hash-verified

90
91// query server information
92func showQuery(ctx Context) error {
93 querykey := ctx.GetRouterName("key")
94 switch querykey {
95 case "state":
96 return ctx.WriteString(jsonutil.GetJsonString(ctx.HttpServer().StateInfo()))
97 case "":
98 return ctx.WriteString("please input key")
99 default:
100 return ctx.WriteString("not support key => " + querykey)
101 }
102}
103
104func showRouters(ctx Context) error {
105 data := ""

Callers

nothing calls this directly

Calls 4

GetRouterNameMethod · 0.65
WriteStringMethod · 0.65
HttpServerMethod · 0.65
StateInfoMethod · 0.45

Tested by

no test coverage detected