MCPcopy
hub / github.com/pingcap/tidb / ParseBackend

Function ParseBackend

br/pkg/storage/parse.go:46–55  ·  view source on GitHub ↗

ParseBackend constructs a structured backend description from the storage URL.

(rawURL string, options *BackendOptions)

Source from the content-addressed store, hash-verified

44// ParseBackend constructs a structured backend description from the
45// storage URL.
46func ParseBackend(rawURL string, options *BackendOptions) (*backuppb.StorageBackend, error) {
47 if len(rawURL) == 0 {
48 return nil, errors.Annotate(berrors.ErrStorageInvalidConfig, "empty store is not allowed")
49 }
50 u, err := ParseRawURL(rawURL)
51 if err != nil {
52 return nil, errors.Trace(err)
53 }
54 return parseBackend(u, rawURL, options)
55}
56
57func parseBackend(u *url.URL, rawURL string, options *BackendOptions) (*backuppb.StorageBackend, error) {
58 if rawURL == "" {

Callers 15

TestPITRIDMapOnStorageFunction · 0.92
RunBackupFunction · 0.92
GetStorageFunction · 0.92
RunBackupRawFunction · 0.92
makeStorageMethod · 0.92
NewStreamMgrFunction · 0.92
createLogClientFunction · 0.92
RunBackupEBSFunction · 0.92
RunBackupTxnFunction · 0.92
RunTestStorageFunction · 0.92

Calls 2

ParseRawURLFunction · 0.85
parseBackendFunction · 0.85

Tested by 15

TestPITRIDMapOnStorageFunction · 0.74
simpleTaskFunction · 0.74
TestCheckingFunction · 0.74
createStorageFunction · 0.74
TestExternalEngineFunction · 0.74
checkFileCleanedFunction · 0.74
checkFileExistFunction · 0.74
TestCDCPITRCheckItemMethod · 0.74
readParquetDataFunction · 0.74
TestCreateStorageFunction · 0.68