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

Method Client

dgraphtest/compose_cluster.go:23–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23func (c *ComposeCluster) Client() (*dgraphapi.GrpcClient, func(), error) {
24 dg, err := dgo.NewClient(testutil.GetSockAddr(),
25 dgo.WithGrpcOption(grpc.WithTransportCredentials(insecure.NewCredentials())))
26 if err != nil {
27 return nil, nil, err
28 }
29 return &dgraphapi.GrpcClient{Dgraph: dg}, func() { dg.Close() }, nil
30}
31
32// HTTPClient creates an HTTP client
33func (c *ComposeCluster) HTTPClient() (*dgraphapi.HTTPClient, error) {

Callers 8

TestNamespacesFunction · 0.95
TestDropNamespaceErrFunction · 0.95
TestDropAllFunction · 0.95
TestDropDataFunction · 0.95
TestDropPredicateFunction · 0.95
TestDropTypeFunction · 0.95
setUpDgraphFunction · 0.95
TestAclCacheRestoreFunction · 0.95

Calls 2

GetSockAddrFunction · 0.92
CloseMethod · 0.65

Tested by 8

TestNamespacesFunction · 0.76
TestDropNamespaceErrFunction · 0.76
TestDropAllFunction · 0.76
TestDropDataFunction · 0.76
TestDropPredicateFunction · 0.76
TestDropTypeFunction · 0.76
setUpDgraphFunction · 0.76
TestAclCacheRestoreFunction · 0.76