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

Function main

cmd/cql-eth-exchange/main.go:45–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func main() {
46 flag.Parse()
47 log.SetStringLevel(logLevel, log.InfoLevel)
48 configFile = utils.HomeDirExpand(configFile)
49 rand.Seed(time.Now().UnixNano())
50
51 cfg, err := loadConfig()
52 if err != nil {
53 return
54 }
55
56 xchg, err := NewExchange(cfg)
57 if err != nil {
58 return
59 }
60
61 err = xchg.Start(context.Background())
62 if err != nil {
63 return
64 }
65
66 <-utils.WaitForExit()
67
68 xchg.Stop()
69}
70
71func loadConfig() (cfg *ExchangeConfig, err error) {
72 _, err = conf.LoadConfig(configFile)

Callers

nothing calls this directly

Calls 7

StartMethod · 0.95
StopMethod · 0.95
SetStringLevelFunction · 0.92
HomeDirExpandFunction · 0.92
WaitForExitFunction · 0.92
NewExchangeFunction · 0.85
loadConfigFunction · 0.70

Tested by

no test coverage detected