extractors

package
v0.0.0-...-7ff9c78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactRootfsReader

type ArtifactRootfsReader struct {
	// contains filtered or unexported fields
}

func NewArtifactExtractor

func NewArtifactExtractor() ArtifactRootfsReader

func (*ArtifactRootfsReader) Close

func (e *ArtifactRootfsReader) Close() error

Close the artifact file

func (*ArtifactRootfsReader) Extract

func (e *ArtifactRootfsReader) Extract() error

Extract the contents of the artifact You MUST call Extract() from a different goroutine than the one reading rootfs data using the Reader().

func (*ArtifactRootfsReader) Open

func (e *ArtifactRootfsReader) Open(path string) error

Open an artifact for extraction

func (*ArtifactRootfsReader) PayloadSize

func (e *ArtifactRootfsReader) PayloadSize() int64

Returns the file size of the extracted rootfs image

func (*ArtifactRootfsReader) Reader

func (e *ArtifactRootfsReader) Reader() *io.PipeReader

Returns a reader for the contents of the rootfs image contained in the artifact

type UpdateFileStorer

type UpdateFileStorer struct {
	FileSize          int64
	FileContentReader *io.PipeReader
	// contains filtered or unexported fields
}

Custom UpdateStore for extracting files from artifacts This is required in order to extract the update files (i.e, the rootfs image) from an artifact using the `areader`, for the purposes of calculating the delta patch between a base and target artifacts. This supports only extracting a single file! Multi-file updates are not supported.

func NewUpdateFileStorer

func NewUpdateFileStorer() UpdateFileStorer

func (UpdateFileStorer) FinishStoreUpdate

func (m UpdateFileStorer) FinishStoreUpdate() error

func (*UpdateFileStorer) Initialize

func (m *UpdateFileStorer) Initialize(artifactHeaders, artifactAugmentedHeaders artifact.HeaderInfoer, payloadHeaders handlers.ArtifactUpdateHeaders) error

func (UpdateFileStorer) PrepareStoreUpdate

func (m UpdateFileStorer) PrepareStoreUpdate() error

func (*UpdateFileStorer) StoreUpdate

func (m *UpdateFileStorer) StoreUpdate(r io.Reader, info os.FileInfo) error

type UpdateFileStorerFactory

type UpdateFileStorerFactory struct {
	// contains filtered or unexported fields
}

Required factory object for calling `SetUpdateStorerProducer` method on installer handlers

func NewUpdateFileStorerFactory

func NewUpdateFileStorerFactory(storer *UpdateFileStorer) UpdateFileStorerFactory

func (UpdateFileStorerFactory) NewUpdateStorer

func (f UpdateFileStorerFactory) NewUpdateStorer(updateType *string, payloadNum int) (handlers.UpdateStorer, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL