Documentation
¶
Index ¶
- func Write(sourceImage, destinationDevice string, compressed bool) error
- type DiskImage
- func (w *DiskImage) Close() error
- func (w *DiskImage) Commit(context.Context, int64, digest.Digest, ...ctrcontent.Opt) error
- func (w *DiskImage) Digest() digest.Digest
- func (w *DiskImage) Status() (ctrcontent.Status, error)
- func (w *DiskImage) Truncate(int64) error
- func (w *DiskImage) Write(p []byte) (n int, err error)
- type DiskImageStore
- type WriteCounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiskImage ¶
type DiskImage struct {
// contains filtered or unexported fields
}
DiskImage -.
func (*DiskImage) Commit ¶
Commit commits the blob (but no roll-back is guaranteed on an error). size and expected can be zero-value when unknown. Commit always closes the writer, even on error. ErrAlreadyExists aborts the writer.
func (*DiskImage) Digest ¶
func (w *DiskImage) Digest() digest.Digest
Digest may return empty digest or panics until committed.
func (*DiskImage) Status ¶
func (w *DiskImage) Status() (ctrcontent.Status, error)
Status returns the current state of write.
type DiskImageStore ¶
type DiskImageStore struct {
// contains filtered or unexported fields
}
DiskImageStore -.
func NewDiskImageStore ¶
func NewDiskImageStore(sourceImage string, compressed bool, w io.Writer) DiskImageStore
NewDiskImageStore -.
func (DiskImageStore) Writer ¶
func (d DiskImageStore) Writer(_ context.Context, opts ...ctrcontent.WriterOpt) (ctrcontent.Writer, error)
Writer get a writer.
type WriteCounter ¶
type WriteCounter struct {
Total uint64
}
WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.
Click to show internal directories.
Click to hide internal directories.