package stdio
import "github.com/Microsoft/opengcs/service/gcs/stdio"
Index ¶
- func NewConsole() (*os.File, string, error)
- func ResizeConsole(pty *os.File, height, width uint16) error
- type ConnectionSet
- func (s *ConnectionSet) Close() error
- func (s *ConnectionSet) Files() (_ *FileSet, err error)
- func (s *ConnectionSet) NewTtyRelay(pty *os.File) *TtyRelay
- type FileSet
- type TtyRelay
Functions ¶
func NewConsole ¶
NewConsole allocates a new console and returns the File for its master and path for its slave.
func ResizeConsole ¶
ResizeConsole sends the appropriate resize to a pTTY FD Synchronization of pty should be handled in the callers context.
Types ¶
type ConnectionSet ¶
type ConnectionSet struct { In, Out, Err transport.Connection }
ConnectionSet is a structure defining the readers and writers the Core implementation should forward a process's stdio through.
func (*ConnectionSet) Close ¶
func (s *ConnectionSet) Close() error
Close closes each stdio connection.
func (*ConnectionSet) Files ¶
func (s *ConnectionSet) Files() (_ *FileSet, err error)
Files returns a FileSet with an os.File for each connection in the connection set.
func (*ConnectionSet) NewTtyRelay ¶
func (s *ConnectionSet) NewTtyRelay(pty *os.File) *TtyRelay
NewTtyRelay returns a new TTY relay for a given master PTY file.
type FileSet ¶
FileSet contains os.File fields for stdio.
func (*FileSet) Close ¶
Close closes all the FileSet handles.
type TtyRelay ¶
type TtyRelay struct {
// contains filtered or unexported fields
}
TtyRelay relays IO between a set of stdio connections and a master PTY file.
func (*TtyRelay) ResizeConsole ¶
ResizeConsole sends the appropriate resize to a pTTY FD
func (*TtyRelay) Start ¶
func (r *TtyRelay) Start()
Start starts the relay operation. The caller must call Wait to wait for the relay to finish and release the associated resources.
func (*TtyRelay) Wait ¶
func (r *TtyRelay) Wait()
Wait waits for the relaying to finish and closes the associated files and connections.
Source Files ¶
- Version
- v0.3.2
- Published
- Aug 8, 2017
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 4 hours ago –
Tools for package owners.