MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / startExplorerServer

Function startExplorerServer

cmd/cql/internal/explorer.go:56–71  ·  view source on GitHub ↗
(explorerAddr string)

Source from the content-addressed store, hash-verified

54}
55
56func 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
73func runExplorer(cmd *Command, args []string) {
74 commonFlagsInit(cmd)

Callers 2

runConsoleFunction · 0.85
runExplorerFunction · 0.85

Calls 7

StartObserverFunction · 0.92
StopObserverFunction · 0.92
SetExitStatusFunction · 0.85
ErrorMethod · 0.80
WithErrorMethod · 0.80
InfofMethod · 0.80
InfoMethod · 0.80

Tested by

no test coverage detected