Documentation
¶
Index ¶
- Constants
- Variables
- func BadPayload(msg any) error
- func ExtractPartitionsFromPayload(reader io.ReadSeeker, partitions_name []string, out_dir string, ...)
- func InitPayloadInfo(reader io.ReadSeeker) (*update_engine.DeltaArchiveManifest, error)
- func PrintPartitionsInfo(manifest *update_engine.DeltaArchiveManifest, partitions_name []string)
- type PayloadHdr
- type ReaderAtCloser
- type UrlRangeReaderAt
- type ZipPayloadReader
Constants ¶
View Source
const PAYLOAD_MAGIC = "CrAU"
Variables ¶
Functions ¶
func BadPayload ¶
func ExtractPartitionsFromPayload ¶
func ExtractPartitionsFromPayload( reader io.ReadSeeker, partitions_name []string, out_dir string, max_workers int, )
func InitPayloadInfo ¶
func InitPayloadInfo(reader io.ReadSeeker) (*update_engine.DeltaArchiveManifest, error)
func PrintPartitionsInfo ¶
func PrintPartitionsInfo(manifest *update_engine.DeltaArchiveManifest, partitions_name []string)
Types ¶
type PayloadHdr ¶
func (*PayloadHdr) Decode ¶
func (p *PayloadHdr) Decode(data []byte) error
func (*PayloadHdr) HdrSize ¶
func (p *PayloadHdr) HdrSize() int
type ReaderAtCloser ¶
type UrlRangeReaderAt ¶
type UrlRangeReaderAt struct {
// contains filtered or unexported fields
}
UrlRangeReaderAt reads data from a URL supporting HTTP Range requests. It implements io.ReaderAt and attempts to reuse the underlying HTTP stream for consecutive ReadAt calls to improve performance on sequential patterns.
func NewUrlRangeReaderAt ¶
func NewUrlRangeReaderAt(url string) *UrlRangeReaderAt
NewUrlRangeReaderAt creates a new UrlRangeReaderAt for the given URL. It uses a default http.Client.
func (*UrlRangeReaderAt) Close ¶
func (r *UrlRangeReaderAt) Close() error
func (*UrlRangeReaderAt) ReadAt ¶
func (r *UrlRangeReaderAt) ReadAt(p []byte, off int64) (n int, err error)
ReadAt implements the io.ReaderAt interface. It reads len(p) bytes from the URL starting at byte offset off. It attempts to reuse the internal stream if 'off' is contiguous with the end of the previous read from the stream.
func (*UrlRangeReaderAt) Size ¶
func (r *UrlRangeReaderAt) Size() int64
type ZipPayloadReader ¶
type ZipPayloadReader struct {
// contains filtered or unexported fields
}
func NewZipPayloadReader ¶
func NewZipPayloadReader(reader io.ReaderAt, size int64) (*ZipPayloadReader, error)
func (*ZipPayloadReader) Close ¶
func (r *ZipPayloadReader) Close() error
Click to show internal directories.
Click to hide internal directories.