Set content labels based on content type

Give control of the content labeling process for children to
the client. This allows the client to control the names
associated with the labels and filter out labels.

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2020-07-21 00:32:31 -07:00
parent 03ab1b2cac
commit c8b14ae4c0
7 changed files with 86 additions and 54 deletions

View File

@@ -312,11 +312,6 @@ type RemoteContext struct {
// afterwards. Unpacking is required to run an image.
Unpack bool
// DiscardContent is a boolean flag to specify whether to allow GC to clean
// layers up from the content store after successfully unpacking these
// contents to the snapshotter.
DiscardContent bool
// UnpackOpts handles options to the unpack call.
UnpackOpts []UnpackOpt
@@ -356,6 +351,10 @@ type RemoteContext struct {
// AllMetadata downloads all manifests and known-configuration files
AllMetadata bool
// ChildLabelMap sets the labels used to reference child objects in the content
// store. By default, all GC reference labels will be set for all fetched content.
ChildLabelMap func(ocispec.Descriptor) []string
}
func defaultRemoteContext() *RemoteContext {