Documentation ¶
Overview ¶
Package appender provides an API to push layers, report progress while pushing and return a resulting image+hash
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AppendResultNone = AppendResult{ Hash: v1.Hash{}, Pushed: mutate.IndexAddendum{}, AddedManifestLayers: []AppendResultLayer{}, }
Functions ¶
This section is empty.
Types ¶
type AppendAnnotate ¶
type AppendAnnotate func(partial.WithRawManifest) v1.Image
type AppendResult ¶
type AppendResult struct { // Hash is the digest of the pushed manifest, including annotate Hash v1.Hash // Pushed is how this result can be added to an index manifest Pushed mutate.IndexAddendum // AddedManifestLayers are manifest data for appended and pushed layers AddedManifestLayers []AppendResultLayer }
type AppendResultLayer ¶
type AppendResultLayer struct { MediaType types.MediaType `json:"mediaType"` Size int64 `json:"size"` Digest v1.Hash `json:"digest"` }
AppendResultLayer is required part of go-containerregistry v1.Descriptor and sufficient to define a layer appended to a manifest
func (*AppendResultLayer) Descriptor ¶
func (l *AppendResultLayer) Descriptor() v1.Descriptor
type Appender ¶
type Appender struct {
// contains filtered or unexported fields
}
Appender transfers layers AND pushes manifest and is reasonably efficient should multiple appenders push the same layers
func New ¶
func New(baseRef name.Digest, baseConfig *registry.RegistryConfig, tagRef name.Reference) (*Appender, error)
New starts Appender setup from a fully specified base ref which might be an image in an index, not necessarily Contain's base. This base image has typically not been read yet, not even its manifest. Remember to optionally call WithAnnotate before Append.
func (*Appender) Append ¶
func (c *Appender) Append(layers ...v1.Layer) (AppendResult, error)
Append is what you call once layers are ready