github.com/LazyboyChen7/engine@v17.12.1-ce-rc2+incompatible/api/types/backend/build.go (about) 1 package backend 2 3 import ( 4 "io" 5 6 "github.com/docker/docker/api/types" 7 "github.com/docker/docker/pkg/streamformatter" 8 ) 9 10 // PullOption defines different modes for accessing images 11 type PullOption int 12 13 const ( 14 // PullOptionNoPull only returns local images 15 PullOptionNoPull PullOption = iota 16 // PullOptionForcePull always tries to pull a ref from the registry first 17 PullOptionForcePull 18 // PullOptionPreferLocal uses local image if it exists, otherwise pulls 19 PullOptionPreferLocal 20 ) 21 22 // ProgressWriter is a data object to transport progress streams to the client 23 type ProgressWriter struct { 24 Output io.Writer 25 StdoutFormatter io.Writer 26 StderrFormatter io.Writer 27 AuxFormatter *streamformatter.AuxFormatter 28 ProgressReaderFunc func(io.ReadCloser) io.ReadCloser 29 } 30 31 // BuildConfig is the configuration used by a BuildManager to start a build 32 type BuildConfig struct { 33 Source io.ReadCloser 34 ProgressWriter ProgressWriter 35 Options *types.ImageBuildOptions 36 } 37 38 // GetImageAndLayerOptions are the options supported by GetImageAndReleasableLayer 39 type GetImageAndLayerOptions struct { 40 PullOption PullOption 41 AuthConfig map[string]types.AuthConfig 42 Output io.Writer 43 OS string 44 }