MCPcopy
hub / github.com/dgraph-io/dgraph / cmd

Method cmd

dgraphtest/dgraph.go:133–153  ·  view source on GitHub ↗
(c *LocalCluster)

Source from the content-addressed store, hash-verified

131}
132
133func (z *zero) cmd(c *LocalCluster) []string {
134 myAddr := fmt.Sprintf("%s:%v", z.aname(), zeroGrpcPort)
135 if z.myAddrOverride != "" {
136 myAddr = z.myAddrOverride
137 }
138 zcmd := []string{buildvars.GoBinDgraphPath.Get(), "zero", fmt.Sprintf("--my=%s", myAddr), "--bindall",
139 fmt.Sprintf(`--replicas=%v`, c.conf.replicas), "--logtostderr", fmt.Sprintf("-v=%d", c.conf.verbosity)}
140
141 if c.lowerThanV21 {
142 zcmd = append(zcmd, fmt.Sprintf(`--idx=%v`, z.id+1), "--telemetry=false")
143 } else {
144 zcmd = append(zcmd, fmt.Sprintf(`--raft=idx=%v`, z.id+1), "--telemetry=reports=false;",
145 fmt.Sprintf(`--limit=refill-interval=%v;uid-lease=%v`, c.conf.refillInterval, c.conf.uidLease))
146 }
147
148 if z.id > 0 {
149 zcmd = append(zcmd, "--peer="+c.zeros[0].aname()+":"+zeroGrpcPort)
150 }
151
152 return zcmd
153}
154
155func (z *zero) workingDir() string {
156 return zeroWorkingDir

Callers

nothing calls this directly

Calls 3

anameMethod · 0.95
GetMethod · 0.65
anameMethod · 0.65

Tested by

no test coverage detected