當前位置: 首頁>>代碼示例>>Golang>>正文


Golang tarexport.NewTarExporter函數代碼示例

本文整理匯總了Golang中github.com/docker/docker/image/tarexport.NewTarExporter函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewTarExporter函數的具體用法?Golang NewTarExporter怎麽用?Golang NewTarExporter使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewTarExporter函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: ExportImage

// ExportImage exports a list of images to the given output stream. The
// exported images are archived into a tar when written to the output
// stream. All images with the given tag and all versions containing
// the same tag are exported. names is the set of tags to export, and
// outStream is the writer which the images are written to.
func (daemon *Daemon) ExportImage(names []string, outStream io.Writer) error {
	imageExporter := tarexport.NewTarExporter(daemon.imageStore, daemon.layerStore, daemon.tagStore)
	return imageExporter.Save(names, outStream)
}
開發者ID:jasonamyers,項目名稱:docker,代碼行數:9,代碼來源:daemon.go

示例2: LoadImage

// LoadImage uploads a set of images into the repository. This is the
// complement of ImageExport.  The input stream is an uncompressed tar
// ball containing images and metadata.
func (daemon *Daemon) LoadImage(inTar io.ReadCloser, outStream io.Writer) error {
	imageExporter := tarexport.NewTarExporter(daemon.imageStore, daemon.layerStore, daemon.tagStore)
	return imageExporter.Load(inTar, outStream)
}
開發者ID:jasonamyers,項目名稱:docker,代碼行數:7,代碼來源:daemon.go

示例3: LoadImage

// LoadImage uploads a set of images into the repository. This is the
// complement of ImageExport.  The input stream is an uncompressed tar
// ball containing images and metadata.
func (daemon *Daemon) LoadImage(inTar io.ReadCloser, outStream io.Writer, quiet bool) error {
	imageExporter := tarexport.NewTarExporter(daemon.imageStore, daemon.layerStore, daemon.referenceStore, daemon)
	return imageExporter.Load(inTar, outStream, quiet)
}
開發者ID:moxiegirl,項目名稱:docker,代碼行數:7,代碼來源:daemon.go


注:本文中的github.com/docker/docker/image/tarexport.NewTarExporter函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。