Documentation
¶
Index ¶
- func AdjustPath(rawURL string, uniqueID string) (string, error)
- func CollectDirFiles(ctx context.Context, dir string, storage storeapi.Storage) (map[string]struct{}, error)
- func CreateStorage(ctx context.Context, path string) (storeapi.Storage, error)
- func IsLocalDiskPath(rawURL string) bool
- func IsNotExistError(err error) bool
- func IsS3Path(rawURL string) bool
- func OpenFile(ctx context.Context, dir, fileName string, storage storeapi.Storage) (objectio.Reader, error)
- func ReadFile(ctx context.Context, dir, fileName string, storage storeapi.Storage) ([]byte, error)
- func RemoveAll(ctx context.Context, dir string, storage storeapi.Storage) error
- func TrimPath(rawURL string, uniqueID string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdjustPath ¶
AdjustPath adjust rawURL, add uniqueId as path suffix, returns a new path. This function supports both local dir or s3 path. It can be used like the following: 1. adjust subtask's `LoaderConfig.Dir`, uniqueID like `.test-mysql01`. 2. add Lightning checkpoint's fileName to rawURL, uniqueID like `/tidb_lightning_checkpoint.pb`.
func CollectDirFiles ¶
func CollectDirFiles(ctx context.Context, dir string, storage storeapi.Storage) (map[string]struct{}, error)
CollectDirFiles gets files in dir.
func CreateStorage ¶
CreateStorage creates ExternalStore.
func IsLocalDiskPath ¶
IsLocalDiskPath judges if path is local disk path.
func IsNotExistError ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.