MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / GetAlphaHttpClient

Method GetAlphaHttpClient

dgraphtest/local_cluster.go:1100–1107  ·  view source on GitHub ↗
(alphaID int)

Source from the content-addressed store, hash-verified

1098}
1099
1100func (c *LocalCluster) GetAlphaHttpClient(alphaID int) (*dgraphapi.HTTPClient, error) {
1101 pubPort, err := publicPort(c.dcli, c.alphas[alphaID], alphaHttpPort)
1102 if err != nil {
1103 return nil, err
1104 }
1105 url := "0.0.0.0:" + pubPort
1106 return dgraphapi.GetHttpClient(url, "")
1107}
1108
1109// serverURL returns url to the 'server' 'endpoint'
1110func (c *LocalCluster) serverURL(server, endpoint string) (string, error) {

Callers

nothing calls this directly

Calls 2

GetHttpClientFunction · 0.92
publicPortFunction · 0.85

Tested by

no test coverage detected