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

Method WriteFile

br/pkg/storage/storage.go:132–132  ·  view source on GitHub ↗

WriteFile writes a complete file to storage, similar to os.WriteFile, but WriteFile should be atomic

(ctx context.Context, name string, data []byte)

Source from the content-addressed store, hash-verified

130type ExternalStorage interface {
131 // WriteFile writes a complete file to storage, similar to os.WriteFile, but WriteFile should be atomic
132 WriteFile(ctx context.Context, name string, data []byte) error
133 // ReadFile reads a complete file from storage, similar to os.ReadFile
134 ReadFile(ctx context.Context, name string) ([]byte, error)
135 // FileExists return true if file exists

Callers 15

writeFunction · 0.65
writeBlocklistFileFunction · 0.65
pefFunction · 0.65
RestoreAFileMethod · 0.65
writeOutputFileMethod · 0.65
RunRestoreFunction · 0.65
saveMetaFileFunction · 0.65
TestFullFunction · 0.65
TestShowViaSQLFunction · 0.65

Implementers 10

AzureBlobStoragebr/pkg/storage/azblob.go
MemStoragebr/pkg/storage/memstore.go
noopStoragebr/pkg/storage/noop.go
HDFSStoragebr/pkg/storage/hdfs.go
S3Storagebr/pkg/storage/s3.go
LocalStoragebr/pkg/storage/local.go
KS3Storagebr/pkg/storage/ks3.go
GCSStoragebr/pkg/storage/gcs.go
MockExternalStoragebr/pkg/mock/storage/storage.go
MockExternalStorageMockRecorderbr/pkg/mock/storage/storage.go

Calls

no outgoing calls

Tested by 15

writeBlocklistFileFunction · 0.52
pefFunction · 0.52
RestoreAFileMethod · 0.52
TestFullFunction · 0.52
TestShowViaSQLFunction · 0.52
TestCreateStorageFunction · 0.52
TestBatchedFunction · 0.52
TestWalkDirSkipSubDirFunction · 0.52
TestWriteNoErrorFunction · 0.52