2018-02-05 21:05:59 +00:00
|
|
|
package build // import "github.com/docker/docker/api/server/router/build"
|
2015-12-18 00:17:50 +00:00
|
|
|
|
2016-01-20 23:32:02 +00:00
|
|
|
import (
|
2018-04-19 22:30:59 +00:00
|
|
|
"context"
|
|
|
|
|
2017-05-15 21:54:27 +00:00
|
|
|
"github.com/docker/docker/api/types"
|
2016-03-29 22:51:14 +00:00
|
|
|
"github.com/docker/docker/api/types/backend"
|
2016-01-20 23:32:02 +00:00
|
|
|
)
|
|
|
|
|
2015-12-18 00:17:50 +00:00
|
|
|
// Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.
|
|
|
|
type Backend interface {
|
2017-04-13 18:37:32 +00:00
|
|
|
// Build a Docker image returning the id of the image
|
2015-12-18 00:17:50 +00:00
|
|
|
// TODO: make this return a reference instead of string
|
2017-04-13 18:37:32 +00:00
|
|
|
Build(context.Context, backend.BuildConfig) (string, error)
|
2017-05-15 21:54:27 +00:00
|
|
|
|
|
|
|
// Prune build cache
|
2018-08-15 21:24:37 +00:00
|
|
|
PruneCache(context.Context, types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
|
2018-04-19 18:08:33 +00:00
|
|
|
|
|
|
|
Cancel(context.Context, string) error
|
2017-04-13 18:37:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type experimentalProvider interface {
|
|
|
|
HasExperimental() bool
|
2015-12-18 00:17:50 +00:00
|
|
|
}
|