Skip to content

Commit 2bbe6ef

Browse files
committed
update failure policy related comment
1 parent 2660d7d commit 2bbe6ef

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

feature/s3/transfermanager/api_op_DownloadDirectory.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ type GetRequestCallback interface {
6060
}
6161

6262
// DownloadDirectoryFailurePolicy is a callback to allow users to control the
63-
// download behavior when there are failed objects. It is invoked for every failed object
63+
// download behavior when there are failed objects. It is invoked for every failed object.
64+
// If the OnDownloadFailed returns non-nil error, downloader will cancel all ongoing
65+
// single object download requests and terminate the download directory process, if it returns nil
66+
// error, downloader will count the current request as a failed object downloaded but continue
67+
// getting other objects.
6468
type DownloadDirectoryFailurePolicy interface {
6569
OnDownloadFailed(*DownloadDirectoryInput, *GetObjectInput, error) error
6670
}
@@ -86,13 +90,9 @@ func (IgnoreDownloadFailurePolicy) OnDownloadFailed(*DownloadDirectoryInput, *Ge
8690
// DownloadDirectoryOutput represents a response from the DownloadDirectory() call
8791
type DownloadDirectoryOutput struct {
8892
// Total number of objects successfully downloaded
89-
// this value might not be the real number of success if user passed a customized
90-
// failure policy in input
9193
ObjectsDownloaded int64
9294

9395
// Total number of objects failed to download
94-
// this value might not be the real number of failure if user passed a customized
95-
// failure policy in input
9696
ObjectsFailed int64
9797
}
9898

feature/s3/transfermanager/api_op_UploadDirectory.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ type PutRequestCallback interface {
6262
}
6363

6464
// UploadDirectoryFailurePolicy is a callback to allow users to control the
65-
// upload behavior when there are failed objects. It is invoked for every failed object
65+
// upload behavior when there are failed objects. It is invoked for every failed object.
66+
// If the OnUploadFailed returns non-nil error, uploader will cancel all ongoing
67+
// single object upload requests and terminate the upload directory process, if it returns nil
68+
// error, uploader will count the current request as a failed object downloaded but continue
69+
// uploading other objects.
6670
type UploadDirectoryFailurePolicy interface {
6771
OnUploadFailed(*UploadDirectoryInput, *UploadObjectInput, error) error
6872
}
@@ -88,13 +92,9 @@ func (IgnoreUploadFailurePolicy) OnUploadFailed(*UploadDirectoryInput, *UploadOb
8892
// UploadDirectoryOutput represents a response from the UploadDirectory() call
8993
type UploadDirectoryOutput struct {
9094
// Total number of objects successfully uploaded
91-
// this value might not be the real number of success if user passed a customized
92-
// failure policy in input
9395
ObjectsUploaded int64
9496

9597
// Total number of objects failed to upload
96-
// this value might not be the real number of failure is user passed a customized
97-
// failure policy in input
9898
ObjectsFailed int64
9999
}
100100

0 commit comments

Comments
 (0)