Documentation ¶
Index ¶
- Constants
- func CacheToc(ctx context.Context, db *bolt.DB, imageName, imageTag, registry string) error
- func NewStarlightLayer(f *os.File, stargzWriter *util.Writer) (goreg.Layer, error)
- func SaveLayer(bucket *bolt.Bucket, entryMap map[string]*util.TOCEntry, ...) error
- type Collection
- type Convertor
- type DeltaBundleBuilder
- type StarlightLayer
- func (l StarlightLayer) Compressed() (io.ReadCloser, error)
- func (l StarlightLayer) DiffID() (goreg.Hash, error)
- func (l StarlightLayer) Digest() (goreg.Hash, error)
- func (l StarlightLayer) MediaType() (types.MediaType, error)
- func (l StarlightLayer) Size() (int64, error)
- func (l StarlightLayer) Uncompressed() (io.ReadCloser, error)
- type StarlightProxyServer
Constants ¶
View Source
const ( ImageArchitecture = "amd64" ImageOS = "linux" MediaTypeImage = "application/vnd.oci.image.index.v1+json" MediaTypeDockerImage = "application/vnd.docker.distribution.manifest.v2+json" )
Variables ¶
This section is empty.
Functions ¶
func NewStarlightLayer ¶
NewStarlightLayer mainly populate the hash values for the StarlightLayer object
Types ¶
type Collection ¶
type Collection struct { Images []*util.ImageRef `json:"i"` Table []*util.OptimizedTraceableEntry `json:"t"` // DigestList starting from 0 DigestList []*util.TraceableBlobDigest `json:"dl"` // ImageDigestReference maps Collection.Images 's layers to the // position in the Collection.DigestList. ImageDigestReference [][]int `json:"idr"` Configs []string `json:"cfg"` // contains filtered or unexported fields }
Collection defines the operations between set of files This data structure only use for data storage in the database
func LoadCollection ¶
func LoadCollection(ctx context.Context, db *bolt.DB, imageList []*util.ImageRef) (*Collection, error)
LoadCollection creates a new operator that combine imageList should be sorted inorder
func (*Collection) AddOptimizeTrace ¶
func (c *Collection) AddOptimizeTrace(opt *fs.OptimizedGroup)
func (*Collection) ComposeDeltaBundle ¶
func (c *Collection) ComposeDeltaBundle() (out *util.ProtocolTemplate)
func (*Collection) Minus ¶
func (c *Collection) Minus(old *Collection)
func (*Collection) RemoveMergedApp ¶
func (c *Collection) RemoveMergedApp() error
func (*Collection) SaveMergedApp ¶
func (c *Collection) SaveMergedApp() error
type Convertor ¶
type Convertor struct {
// contains filtered or unexported fields
}
func NewConvertor ¶
func (*Convertor) ToStarlightImage ¶
type DeltaBundleBuilder ¶
type DeltaBundleBuilder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(ctx context.Context, registry string) *DeltaBundleBuilder
func (*DeltaBundleBuilder) WriteBody ¶
func (ib *DeltaBundleBuilder) WriteBody(w io.Writer, c *util.ProtocolTemplate, wg *sync.WaitGroup) (err error)
func (*DeltaBundleBuilder) WriteHeader ¶
type StarlightLayer ¶
type StarlightLayer struct { R io.Reader // Diff is the hash of the uncompressed layer Diff goreg.Hash // Hash is the hash of the compressed layer Hash goreg.Hash SizeVal int64 }
func (StarlightLayer) Compressed ¶
func (l StarlightLayer) Compressed() (io.ReadCloser, error)
func (StarlightLayer) Size ¶
func (l StarlightLayer) Size() (int64, error)
func (StarlightLayer) Uncompressed ¶
func (l StarlightLayer) Uncompressed() (io.ReadCloser, error)
type StarlightProxyServer ¶
Click to show internal directories.
Click to hide internal directories.