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

Method Main

cmd/admin/proxy.go:22–42  ·  view source on GitHub ↗
(d map[string]interface{})

Source from the content-addressed store, hash-verified

20}
21
22func (t *cmdProxy) Main(d map[string]interface{}) {
23 t.addr = utils.ArgumentMust(d, "--proxy")
24 t.auth, _ = d["--auth"].(string)
25
26 switch {
27 default:
28 t.handleOverview(d)
29 case d["--start"].(bool):
30 t.handleStart(d)
31 case d["--shutdown"].(bool):
32 t.handleShutdown(d)
33 case d["--log-level"] != nil:
34 t.handleLogLevel(d)
35 case d["--fillslots"] != nil:
36 t.handleFillSlots(d)
37 case d["--reset-stats"].(bool):
38 t.handleResetStats(d)
39 case d["--forcegc"].(bool):
40 t.handleForceGC(d)
41 }
42}
43
44func (t *cmdProxy) newProxyClient(xauth bool) *proxy.ApiClient {
45 c := proxy.NewApiClient(t.addr)

Callers 1

mainFunction · 0.45

Calls 7

handleOverviewMethod · 0.95
handleStartMethod · 0.95
handleShutdownMethod · 0.95
handleLogLevelMethod · 0.95
handleFillSlotsMethod · 0.95
handleResetStatsMethod · 0.95
handleForceGCMethod · 0.95

Tested by

no test coverage detected