github.com/cookieai-jar/moby@v17.12.1-ce-rc2+incompatible/api/server/router/build/backend.go (about)

     1  package build
     2  
     3  import (
     4  	"github.com/docker/docker/api/types"
     5  	"github.com/docker/docker/api/types/backend"
     6  	"golang.org/x/net/context"
     7  )
     8  
     9  // Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.
    10  type Backend interface {
    11  	// Build a Docker image returning the id of the image
    12  	// TODO: make this return a reference instead of string
    13  	Build(context.Context, backend.BuildConfig) (string, error)
    14  
    15  	// Prune build cache
    16  	PruneCache(context.Context) (*types.BuildCachePruneReport, error)
    17  }
    18  
    19  type experimentalProvider interface {
    20  	HasExperimental() bool
    21  }