github.com/marksheahan/packer@v0.10.2-0.20160613200515-1acb2d6645a0/communicator/none/communicator.go (about) 1 package none 2 3 import ( 4 "errors" 5 "github.com/mitchellh/packer/packer" 6 "io" 7 "os" 8 ) 9 10 type comm struct { 11 config string 12 } 13 14 // Creates a null packer.Communicator implementation. This takes 15 // an already existing configuration. 16 func New(config string) (result *comm, err error) { 17 // Establish an initial connection and connect 18 result = &comm{ 19 config: config, 20 } 21 22 return 23 } 24 25 func (c *comm) Start(cmd *packer.RemoteCmd) (err error) { 26 cmd.SetExited(0) 27 return 28 } 29 30 func (c *comm) Upload(path string, input io.Reader, fi *os.FileInfo) error { 31 return errors.New("Upload is not implemented when communicator = 'none'") 32 } 33 34 func (c *comm) UploadDir(dst string, src string, excl []string) error { 35 return errors.New("UploadDir is not implemented when communicator = 'none'") 36 } 37 38 func (c *comm) Download(path string, output io.Writer) error { 39 return errors.New("Download is not implemented when communicator = 'none'") 40 }