MCPcopy Create free account
hub / github.com/XTXMarkets/ternfs / StartWeb

Method StartWeb

go/core/managedprocess/managedprocess.go:585–611  ·  view source on GitHub ↗
(ll *log.Logger, opts *WebOptions)

Source from the content-addressed store, hash-verified

583}
584
585func (procs *ManagedProcesses) StartWeb(ll *log.Logger, opts *WebOptions) {
586 createDataDir(opts.Dir)
587 args := []string{
588 "-log-file", path.Join(opts.Dir, "log"),
589 "-registry", opts.RegistryAddress,
590 }
591 if opts.LogLevel == log.DEBUG {
592 args = append(args, "-verbose")
593 }
594 if opts.LogLevel == log.TRACE {
595 args = append(args, "-trace")
596 }
597 if opts.Xmon != "" {
598 args = append(args, "-xmon", opts.Xmon)
599 }
600 if opts.HttpPort != "" {
601 args = append(args, "-http-port", opts.HttpPort)
602 }
603 procs.Start(ll, &ManagedProcessArgs{
604 Name: "web",
605 Exe: opts.Exe,
606 Args: args,
607 StdoutFile: path.Join(opts.Dir, "stdout"),
608 StderrFile: path.Join(opts.Dir, "stderr"),
609 TerminateOnExit: true,
610 })
611}
612
613type GoExes struct {
614 BlocksExe string

Callers 1

mainFunction · 0.80

Calls 2

StartMethod · 0.95
createDataDirFunction · 0.85

Tested by

no test coverage detected