backend.go 598 B

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