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

Function NewExportStorage

worker/export.go:577–586  ·  view source on GitHub ↗
(in *pb.ExportRequest, backupName string)

Source from the content-addressed store, hash-verified

575}
576
577func NewExportStorage(in *pb.ExportRequest, backupName string) (ExportStorage, error) {
578 switch {
579 case strings.HasPrefix(in.Destination, "/"):
580 return newLocalExportStorage(in.Destination, backupName)
581 case strings.HasPrefix(in.Destination, "minio://") || strings.HasPrefix(in.Destination, "s3://"):
582 return newRemoteExportStorage(in, backupName)
583 default:
584 return newLocalExportStorage(x.WorkerConfig.ExportPath, backupName)
585 }
586}
587
588// export creates a export of data by exporting it as an RDF gzip.
589func export(ctx context.Context, in *pb.ExportRequest) (ExportedFiles, error) {

Callers 2

runExportBackupFunction · 0.92
exportInternalFunction · 0.85

Calls 2

newLocalExportStorageFunction · 0.85
newRemoteExportStorageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…