github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/moby/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 19 Cancel(context.Context, string) error 20 } 21 22 type experimentalProvider interface { 23 HasExperimental() bool 24 }