()
| 21 | } |
| 22 | |
| 23 | func (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 |
| 33 | func (c *ComposeCluster) HTTPClient() (*dgraphapi.HTTPClient, error) { |