1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/execdriver/windows/ttyconsole.go
Qiang Huang f9b5eb0cac Fix golint warnings for daemon/execdriver/windows
Addresses: #14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-08-03 09:54:02 +08:00

32 lines
681 B
Go

// +build windows
package windows
import (
"github.com/microsoft/hcsshim"
)
// TtyConsole implements the exec driver Terminal interface.
type TtyConsole struct {
id string
processid uint32
}
// NewTtyConsole returns a new TtyConsole struct.
func NewTtyConsole(id string, processid uint32) *TtyConsole {
tty := &TtyConsole{
id: id,
processid: processid,
}
return tty
}
// Resize implements Resize method of Terminal interface.
func (t *TtyConsole) Resize(h, w int) error {
return hcsshim.ResizeConsoleInComputeSystem(t.id, t.processid, h, w)
}
// Close implements Close method of Terminal interface.
func (t *TtyConsole) Close() error {
return nil
}