Since Go 1.7, context is a standard package. Since Go 1.9, everything that is provided by "x/net/context" is a couple of type aliases to types in "context". Many vendored packages still use x/net/context, so vendor entry remains for now. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Upstream-commit: 7d62e40f7e4f3c17d229a7687d6fcca5448de813 Component: engine
23 lines
643 B
Go
23 lines
643 B
Go
package build // import "github.com/docker/docker/api/server/router/build"
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/api/types/backend"
|
|
)
|
|
|
|
// Backend abstracts an image builder whose only purpose is to build an image referenced by an imageID.
|
|
type Backend interface {
|
|
// Build a Docker image returning the id of the image
|
|
// TODO: make this return a reference instead of string
|
|
Build(context.Context, backend.BuildConfig) (string, error)
|
|
|
|
// Prune build cache
|
|
PruneCache(context.Context) (*types.BuildCachePruneReport, error)
|
|
}
|
|
|
|
type experimentalProvider interface {
|
|
HasExperimental() bool
|
|
}
|