Documentation ¶
Index ¶
- type BufferedImageResolver
- func (bir *BufferedImageResolver) DigestDescriptor(ctx context.Context, dgst digest.Digest) (specs.Descriptor, error)
- func (bir *BufferedImageResolver) MatchDefaultPlatform() platforms.MatchComparer
- func (bir *BufferedImageResolver) ResolveDescriptor(ctx context.Context, ref string) (specs.Descriptor, error)
- func (bir *BufferedImageResolver) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error)
- type ResolverOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedImageResolver ¶
type BufferedImageResolver struct { contentutil.Buffer // contains filtered or unexported fields }
BufferedImageResolver is an image resolver with a public Buffer. It implements the llb.ImageMetaResolver, content.Provider, and content.Ingester interfaces.
func NewBufferedImageResolver ¶
func NewBufferedImageResolver(with ...ResolverOpt) *BufferedImageResolver
NewBufferedImageResolver returns a resolver that exposes its content so that the consumers can read manifests and other descriptors from the fetched index.
func (*BufferedImageResolver) DigestDescriptor ¶
func (bir *BufferedImageResolver) DigestDescriptor(ctx context.Context, dgst digest.Digest) (specs.Descriptor, error)
DigestDescriptor returns a specs.Descriptor for the given digest, or an error if the content is not found. It does not attempt to fetch the digest remotely.
func (*BufferedImageResolver) MatchDefaultPlatform ¶
func (bir *BufferedImageResolver) MatchDefaultPlatform() platforms.MatchComparer
func (*BufferedImageResolver) ResolveDescriptor ¶
func (bir *BufferedImageResolver) ResolveDescriptor(ctx context.Context, ref string) (specs.Descriptor, error)
ResolveDescriptor returns a specs.Descriptor by first trying to load by digest from the local store, or else falling back to resolving ref against the remote registry.
func (*BufferedImageResolver) ResolveImageConfig ¶
func (bir *BufferedImageResolver) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error)
ResolveImageConfig fetches descriptors from ref from the remote registry. It returns the manifest list digest and the image config as raw JSON bytes. After returning successfully, the BufferedImageResolver can be queried for all other descriptors associated with the ref.
type ResolverOpt ¶
type ResolverOpt func(*BufferedImageResolver)
func WithBuffer ¶
func WithBuffer(buffer contentutil.Buffer) ResolverOpt
func WithDefaultPlatform ¶
func WithDefaultPlatform(p specs.Platform) ResolverOpt