MCPcopy
hub / github.com/CodisLabs/codis / Main

Method Main

cmd/admin/dashboard.go:23–88  ·  view source on GitHub ↗
(d map[string]interface{})

Source from the content-addressed store, hash-verified

21}
22
23func (t *cmdDashboard) Main(d map[string]interface{}) {
24 t.addr = utils.ArgumentMust(d, "--dashboard")
25
26 switch {
27
28 default:
29 t.handleOverview(d)
30
31 case d["--shutdown"].(bool):
32 t.handleShutdown(d)
33 case d["--reload"].(bool):
34 t.handleReload(d)
35 case d["--log-level"] != nil:
36 t.handleLogLevel(d)
37
38 case d["--slots-assign"].(bool):
39 fallthrough
40 case d["--slots-status"].(bool):
41 t.handleSlotsCommand(d)
42
43 case d["--create-proxy"].(bool):
44 fallthrough
45 case d["--online-proxy"].(bool):
46 fallthrough
47 case d["--remove-proxy"].(bool):
48 fallthrough
49 case d["--reinit-proxy"].(bool):
50 fallthrough
51 case d["--proxy-status"].(bool):
52 t.handleProxyCommand(d)
53
54 case d["--create-group"].(bool):
55 fallthrough
56 case d["--remove-group"].(bool):
57 fallthrough
58 case d["--resync-group"].(bool):
59 fallthrough
60 case d["--group-add"].(bool):
61 fallthrough
62 case d["--group-del"].(bool):
63 fallthrough
64 case d["--group-status"].(bool):
65 fallthrough
66 case d["--replica-groups"].(bool):
67 fallthrough
68 case d["--promote-server"].(bool):
69 t.handleGroupCommand(d)
70
71 case d["--sentinel-add"].(bool):
72 fallthrough
73 case d["--sentinel-del"].(bool):
74 fallthrough
75 case d["--sentinel-resync"].(bool):
76 t.handleSentinelCommand(d)
77
78 case d["--sync-action"].(bool):
79 t.handleSyncActionCommand(d)
80

Callers

nothing calls this directly

Calls 11

handleOverviewMethod · 0.95
handleShutdownMethod · 0.95
handleReloadMethod · 0.95
handleLogLevelMethod · 0.95
handleSlotsCommandMethod · 0.95
handleProxyCommandMethod · 0.95
handleGroupCommandMethod · 0.95
handleSentinelCommandMethod · 0.95
handleSlotRebalanceMethod · 0.95

Tested by

no test coverage detected