github.com/gondor/docker@v1.9.0-rc1/daemon/execdriver/windows/ttyconsole.go (about)

     1  // +build windows
     2  
     3  package windows
     4  
     5  import (
     6  	"github.com/microsoft/hcsshim"
     7  )
     8  
     9  // TtyConsole implements the exec driver Terminal interface.
    10  type TtyConsole struct {
    11  	id        string
    12  	processid uint32
    13  }
    14  
    15  // NewTtyConsole returns a new TtyConsole struct.
    16  func NewTtyConsole(id string, processid uint32) *TtyConsole {
    17  	tty := &TtyConsole{
    18  		id:        id,
    19  		processid: processid,
    20  	}
    21  	return tty
    22  }
    23  
    24  // Resize implements Resize method of Terminal interface.
    25  func (t *TtyConsole) Resize(h, w int) error {
    26  	return hcsshim.ResizeConsoleInComputeSystem(t.id, t.processid, h, w)
    27  }
    28  
    29  // Close implements Close method of Terminal interface.
    30  func (t *TtyConsole) Close() error {
    31  	return nil
    32  }