2017-04-13 18:37:32 +00:00
|
|
|
package backend
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"github.com/docker/docker/api/types"
|
2017-04-06 12:33:56 +00:00
|
|
|
"github.com/docker/docker/pkg/streamformatter"
|
2017-04-13 18:37:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ProgressWriter is a data object to transport progress streams to the client
|
|
|
|
type ProgressWriter struct {
|
|
|
|
Output io.Writer
|
2017-05-01 18:54:56 +00:00
|
|
|
StdoutFormatter io.Writer
|
|
|
|
StderrFormatter io.Writer
|
2017-04-06 12:33:56 +00:00
|
|
|
AuxFormatter *streamformatter.AuxFormatter
|
2017-04-13 18:37:32 +00:00
|
|
|
ProgressReaderFunc func(io.ReadCloser) io.ReadCloser
|
|
|
|
}
|
|
|
|
|
|
|
|
// BuildConfig is the configuration used by a BuildManager to start a build
|
|
|
|
type BuildConfig struct {
|
|
|
|
Source io.ReadCloser
|
|
|
|
ProgressWriter ProgressWriter
|
|
|
|
Options *types.ImageBuildOptions
|
|
|
|
}
|
2017-03-28 01:36:28 +00:00
|
|
|
|
|
|
|
// GetImageAndLayerOptions are the options supported by GetImageAndLayer
|
|
|
|
type GetImageAndLayerOptions struct {
|
|
|
|
ForcePull bool
|
|
|
|
AuthConfig map[string]types.AuthConfig
|
|
|
|
Output io.Writer
|
|
|
|
}
|