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

Method serverURL

dgraphtest/local_cluster.go:1110–1120  ·  view source on GitHub ↗

serverURL returns url to the 'server' 'endpoint'

(server, endpoint string)

Source from the content-addressed store, hash-verified

1108
1109// serverURL returns url to the 'server' 'endpoint'
1110func (c *LocalCluster) serverURL(server, endpoint string) (string, error) {
1111 pubPort, err := publicPort(c.dcli, c.alphas[0], alphaHttpPort)
1112 if server == "zero" {
1113 pubPort, err = publicPort(c.dcli, c.zeros[0], zeroHttpPort)
1114 }
1115 if err != nil {
1116 return "", err
1117 }
1118 url := "0.0.0.0:" + pubPort + endpoint
1119 return url, nil
1120}
1121
1122// AlphasHealth returns response of health endpoint for all alphas
1123func (c *LocalCluster) AlphasHealth() ([]string, error) {

Callers 1

HTTPClientMethod · 0.95

Calls 1

publicPortFunction · 0.85

Tested by

no test coverage detected