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

Method GetZeroContainerName

dgraphtest/local_cluster.go:621–626  ·  view source on GitHub ↗

GetZeroContainerName returns the Docker container name for the specified Zero, which also serves as a DNS alias on the cluster network.

(id int)

Source from the content-addressed store, hash-verified

619// GetZeroContainerName returns the Docker container name for the specified Zero,
620// which also serves as a DNS alias on the cluster network.
621func (c *LocalCluster) GetZeroContainerName(id int) (string, error) {
622 if id >= c.conf.numZeros {
623 return "", fmt.Errorf("invalid id of zero: %v", id)
624 }
625 return c.zeros[id].containerName, nil
626}
627
628// SetZeroMyAddr overrides the --my flag for the specified Zero node. The next
629// time the container is recreated (via RecreateZero), this address will be

Callers 2

ChangeZeroAddressMethod · 0.95

Calls 1

ErrorfMethod · 0.45

Tested by 1