mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f9b5eb0cac
Addresses: #14756 Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
32 lines
681 B
Go
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
|
|
}
|