Documentation ¶
Index ¶
- type Pair
- func (p *Pair) Close()
- func (p *Pair) External() *os.File
- func (p *Pair) Handle(events <-chan Size)
- func (p *Pair) HandleWith(events <-chan Size, effect func(event Size))
- func (p *Pair) Internal() *os.File
- func (p *Pair) Open(rawMode bool) error
- func (p *Pair) RawMode()
- func (p *Pair) RestoreMode()
- func (p *Pair) UnhangHack()
- func (p *Pair) Use(pty *os.File)
- type Pipes
- type Size
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pair ¶
type Pair struct {
// contains filtered or unexported fields
}
Pair represents a pair of pty and tty
func (*Pair) Close ¶
func (p *Pair) Close()
Close restores the input modes of each terminal and then calls close. When p is not initialized, does nothing.
func (*Pair) External ¶
External returns an os.File pointing to the master terminal. This is the terminal that should be used for communication.
func (*Pair) HandleWith ¶
HandleWith instructs this Pair to resize according to events in this channel. Whenever a resize occurs, the effect function is called except when it is nil.
func (*Pair) Internal ¶
Internal returns an os.File pointing to the slave terminal. This is the terminal that internal programs should run on.
func (*Pair) RawMode ¶
func (p *Pair) RawMode()
RawMode places the inputs of this terminal into raw mode.
func (*Pair) RestoreMode ¶
func (p *Pair) RestoreMode()
RestoreMode restores the input modes of this terminal.
func (*Pair) UnhangHack ¶
func (p *Pair) UnhangHack()
UnhangHack will attempt to emulate a user exit on the underlying terminal. This is to unblock any potentially stuck "Read()" call to it.
type Pipes ¶
type Pipes struct {
StdoutPipe, StderrPipe *os.File
StdinPipe *os.File
// contains filtered or unexported fields
}
Pipes can be used by a Process to implement piped input / output
func (*Pipes) Stderr ¶
func (p *Pipes) Stderr() (stderr io.ReadCloser, err error)
Stderr returns a pipe to Stderr