You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
552 B
Go
21 lines
552 B
Go
6 years ago
|
package llb
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
gw "github.com/moby/buildkit/frontend/gateway/client"
|
||
|
digest "github.com/opencontainers/go-digest"
|
||
|
)
|
||
|
|
||
|
// WithMetaResolver adds a metadata resolver to an image
|
||
|
func WithMetaResolver(mr ImageMetaResolver) ImageOption {
|
||
|
return imageOptionFunc(func(ii *ImageInfo) {
|
||
|
ii.metaResolver = mr
|
||
|
})
|
||
|
}
|
||
|
|
||
|
// ImageMetaResolver can resolve image config metadata from a reference
|
||
|
type ImageMetaResolver interface {
|
||
|
ResolveImageConfig(ctx context.Context, ref string, opt gw.ResolveImageConfigOpt) (digest.Digest, []byte, error)
|
||
|
}
|