github.com/gondor/docker@v1.9.0-rc1/daemon/graphdriver/imagerestorer.go (about)

     1  package graphdriver
     2  
     3  import (
     4  	"io"
     5  
     6  	"github.com/docker/docker/image"
     7  )
     8  
     9  // NOTE: These interfaces are used for implementing specific features of the Windows
    10  // graphdriver implementation.  The current versions are a short-term solution and
    11  // likely to change or possibly be eliminated, so avoid using them outside of the Windows
    12  // graphdriver code.
    13  
    14  // ImageRestorer interface allows the implementer to add a custom image to
    15  // the graph and tagstore.
    16  type ImageRestorer interface {
    17  	RestoreCustomImages(tagger Tagger, recorder Recorder) ([]string, error)
    18  }
    19  
    20  // Tagger is an interface that exposes the TagStore.Tag function without needing
    21  // to import graph.
    22  type Tagger interface {
    23  	Tag(repoName, tag, imageName string, force bool) error
    24  }
    25  
    26  // Recorder is an interface that exposes the Graph.Register and Graph.Exists
    27  // functions without needing to import graph.
    28  type Recorder interface {
    29  	Exists(id string) bool
    30  	Register(img image.Descriptor, layerData io.Reader) error
    31  }