backend.go 712 B

1234567891011121314151617181920212223
  1. package build // import "github.com/docker/docker/api/server/router/build"
  2. import (
  3. "context"
  4. "github.com/docker/docker/api/types"
  5. "github.com/docker/docker/api/types/backend"
  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.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
  14. Cancel(context.Context, string) error
  15. }
  16. type experimentalProvider interface {
  17. HasExperimental() bool
  18. }