Skip to content

Commit ac9f874

Browse files
resolved comments
Signed-off-by: Xiaoxuan Wang <[email protected]>
1 parent cedf1bb commit ac9f874

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

copy.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ import (
3737
// defaultConcurrency is the default value of CopyGraphOptions.Concurrency.
3838
const defaultConcurrency int = 3 // This value is consistent with dockerd and containerd.
3939

40-
// SkipNode signals to stop copying a descriptor. When returned from PreCopy the blob must exist in the target.
40+
// SkipNode signals to stop copying a descriptor. When returned from PreCopy the blob must exist in the target.
4141
// This can be used to signal that a blob has been made available in the target repository by "Mount()" or some other technique.
42-
var SkipNode = errors.New("skip descriptor")
42+
var SkipNode = errors.New("skip node")
4343

4444
// DefaultCopyOptions provides the default CopyOptions.
4545
var DefaultCopyOptions CopyOptions = CopyOptions{
@@ -96,7 +96,9 @@ type CopyGraphOptions struct {
9696
// cached in the memory.
9797
// If less than or equal to 0, a default (currently 4 MiB) is used.
9898
MaxMetadataBytes int64
99-
// PreCopy handles the current descriptor before copying it.
99+
// PreCopy handles the current descriptor before copying it. It returns SkipNode
100+
// if a blob already exists in the target, this means a blob may has been made
101+
// available in the target repository by "Mount()" or some other technique.
100102
PreCopy func(ctx context.Context, desc ocispec.Descriptor) error
101103
// PostCopy handles the current descriptor after copying it.
102104
PostCopy func(ctx context.Context, desc ocispec.Descriptor) error

0 commit comments

Comments
 (0)