MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / Export

Method Export

worker/export.go:972–987  ·  view source on GitHub ↗

Export request is used to trigger exports for the request list of groups. If a server receives request to export a group that it doesn't handle, it would automatically relay that request to the server that it thinks should handle the request.

(ctx context.Context, req *pb.ExportRequest)

Source from the content-addressed store, hash-verified

970// If a server receives request to export a group that it doesn't handle, it would
971// automatically relay that request to the server that it thinks should handle the request.
972func (w *grpcWorker) Export(ctx context.Context, req *pb.ExportRequest) (*pb.ExportResponse, error) {
973 glog.Infof("Received export request via Grpc: %+v\n", req)
974 if ctx.Err() != nil {
975 glog.Errorf("Context error during export: %v\n", ctx.Err())
976 return nil, ctx.Err()
977 }
978
979 glog.Infof("Issuing export request...")
980 files, err := export(ctx, req)
981 if err != nil {
982 glog.Errorf("While running export. Request: %+v. Error=%v\n", req, err)
983 return nil, err
984 }
985 glog.Infof("Export request: %+v OK.\n", req)
986 return &pb.ExportResponse{Msg: "SUCCESS", Files: files}, nil
987}
988
989func handleExportOverNetwork(ctx context.Context, in *pb.ExportRequest) (ExportedFiles, error) {
990 if in.GroupId == groups().groupId() {

Callers

nothing calls this directly

Calls 3

exportFunction · 0.85
InfofMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected