steer

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputSteerer

type InputSteerer struct {
	// contains filtered or unexported fields
}

InputSteerer is a mechanism for directing input to one of a set of Readers. This is used when the debugger runs an exec: we can't interrupt a Read from the exec context, so if we naively passed the primary reader into the exec, it would swallow the next debugger command after the exec session ends. To work around this, have a goroutine which continuously reads from the input, and steers data into the appropriate writer depending whether we have an exec session active.

func NewInputSteerer

func NewInputSteerer(inputReader io.Reader, ws ...io.WriteCloser) *InputSteerer

func (*InputSteerer) Pop

func (is *InputSteerer) Pop()

Pop causes future input to be directed to the writer where it was going before the last call to Push.

func (*InputSteerer) Push

func (is *InputSteerer) Push(w io.WriteCloser)

Push pushes a new writer to steer input to, until Pop is called to steer it back to the previous writer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL