MCPcopy Create free account
hub / github.com/linuxkit/linuxkit / TarReader

Method TarReader

src/cmd/linuxkit/cache/imagesource.go:82–92  ·  view source on GitHub ↗

TarReader return an io.ReadCloser to read the filesystem contents of the image, as resolved to the provided architecture.

()

Source from the content-addressed store, hash-verified

80// TarReader return an io.ReadCloser to read the filesystem contents of the image,
81// as resolved to the provided architecture.
82func (c ImageSource) TarReader() (io.ReadCloser, error) {
83 imageName := c.ref.String()
84
85 // get a reference to the image
86 image, err := c.provider.findImage(imageName, *c.platform)
87 if err != nil {
88 return nil, err
89 }
90
91 return mutate.Extract(image), nil
92}
93
94// V1TarReader return an io.ReadCloser to read the image as a v1 tarball
95func (c ImageSource) V1TarReader(overrideName string) (io.ReadCloser, error) {

Callers

nothing calls this directly

Calls 3

findImageMethod · 0.80
StringMethod · 0.65
ExtractMethod · 0.65

Tested by

no test coverage detected