images: document config utility function
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
ed1c40420e
commit
2a1f7b647b
@ -67,6 +67,11 @@ func (image *Image) Size(ctx context.Context, provider content.Provider) (int64,
|
|||||||
}), ChildrenHandler(provider)), image.Target)
|
}), ChildrenHandler(provider)), image.Target)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Config resolves the image configuration descriptor using a content provided
|
||||||
|
// to resolve child resources on the image.
|
||||||
|
//
|
||||||
|
// The caller can then use the descriptor to resolve and process the
|
||||||
|
// configuration of the image.
|
||||||
func Config(ctx context.Context, provider content.Provider, image ocispec.Descriptor) (ocispec.Descriptor, error) {
|
func Config(ctx context.Context, provider content.Provider, image ocispec.Descriptor) (ocispec.Descriptor, error) {
|
||||||
var configDesc ocispec.Descriptor
|
var configDesc ocispec.Descriptor
|
||||||
return configDesc, Walk(ctx, HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
|
return configDesc, Walk(ctx, HandlerFunc(func(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user