github.com/moby/docker@v26.1.3+incompatible/api/server/router/build/backend.go (about)

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