Commit ac9f874 1 parent cedf1bb commit ac9f874 Copy full SHA for ac9f874
File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ import (
37
37
// defaultConcurrency is the default value of CopyGraphOptions.Concurrency.
38
38
const defaultConcurrency int = 3 // This value is consistent with dockerd and containerd.
39
39
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.
41
41
// 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 " )
43
43
44
44
// DefaultCopyOptions provides the default CopyOptions.
45
45
var DefaultCopyOptions CopyOptions = CopyOptions {
@@ -96,7 +96,9 @@ type CopyGraphOptions struct {
96
96
// cached in the memory.
97
97
// If less than or equal to 0, a default (currently 4 MiB) is used.
98
98
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.
100
102
PreCopy func (ctx context.Context , desc ocispec.Descriptor ) error
101
103
// PostCopy handles the current descriptor after copying it.
102
104
PostCopy func (ctx context.Context , desc ocispec.Descriptor ) error
You can’t perform that action at this time.
0 commit comments