(d map[string]interface{})
| 20 | } |
| 21 | |
| 22 | func (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 | |
| 44 | func (t *cmdProxy) newProxyClient(xauth bool) *proxy.ApiClient { |
| 45 | c := proxy.NewApiClient(t.addr) |
no test coverage detected