(explorerAddr string)
| 54 | } |
| 55 | |
| 56 | func startExplorerServer(explorerAddr string) func() { |
| 57 | var err error |
| 58 | explorerService, explorerHTTPServer, err = observer.StartObserver(explorerAddr, Version) |
| 59 | if err != nil { |
| 60 | ConsoleLog.WithError(err).Error("start explorer failed") |
| 61 | SetExitStatus(1) |
| 62 | return nil |
| 63 | } |
| 64 | |
| 65 | ConsoleLog.Infof("explorer server started on %s", explorerAddr) |
| 66 | |
| 67 | return func() { |
| 68 | _ = observer.StopObserver(explorerService, explorerHTTPServer) |
| 69 | ConsoleLog.Info("explorer stopped") |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | func runExplorer(cmd *Command, args []string) { |
| 74 | commonFlagsInit(cmd) |
no test coverage detected