Documentation ¶
Index ¶
- type Config
- func (c *Config) CloseStreams() error
- func (c *Config) CopyToPipe(iop libcontainerd.IOPipe)
- func (c *Config) NewInputPipes()
- func (c *Config) NewNopInputPipe()
- func (c *Config) Stderr() *broadcaster.Unbuffered
- func (c *Config) StderrPipe() io.ReadCloser
- func (c *Config) Stdin() io.ReadCloser
- func (c *Config) StdinPipe() io.WriteCloser
- func (c *Config) Stdout() *broadcaster.Unbuffered
- func (c *Config) StdoutPipe() io.ReadCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config holds information about I/O streams managed together.
config.StdinPipe returns a WriteCloser which can be used to feed data to the standard input of the streamConfig's active process. config.StdoutPipe and streamConfig.StderrPipe each return a ReadCloser which can be used to retrieve the standard output (and error) generated by the container's active process. The output (and error) are actually copied and delivered to all StdoutPipe and StderrPipe consumers, using a kind of "broadcaster".
func NewConfig ¶
func NewConfig() *Config
NewConfig creates a stream config and initializes the standard err and standard out to new unbuffered broadcasters.
func (*Config) CloseStreams ¶
CloseStreams ensures that the configured streams are properly closed.
func (*Config) CopyToPipe ¶
func (c *Config) CopyToPipe(iop libcontainerd.IOPipe)
CopyToPipe connects streamconfig with a libcontainerd.IOPipe
func (*Config) NewInputPipes ¶
func (c *Config) NewInputPipes()
NewInputPipes creates new pipes for both standard inputs, Stdin and StdinPipe.
func (*Config) NewNopInputPipe ¶
func (c *Config) NewNopInputPipe()
NewNopInputPipe creates a new input pipe that will silently drop all messages in the input.
func (*Config) Stderr ¶
func (c *Config) Stderr() *broadcaster.Unbuffered
Stderr returns the standard error in the configuration.
func (*Config) StderrPipe ¶
func (c *Config) StderrPipe() io.ReadCloser
StderrPipe creates a new io.ReadCloser with an empty bytes pipe. It adds this new err pipe to the Stderr broadcaster.
func (*Config) Stdin ¶
func (c *Config) Stdin() io.ReadCloser
Stdin returns the standard input in the configuration.
func (*Config) StdinPipe ¶
func (c *Config) StdinPipe() io.WriteCloser
StdinPipe returns an input writer pipe as an io.WriteCloser.
func (*Config) Stdout ¶
func (c *Config) Stdout() *broadcaster.Unbuffered
Stdout returns the standard output in the configuration.
func (*Config) StdoutPipe ¶
func (c *Config) StdoutPipe() io.ReadCloser
StdoutPipe creates a new io.ReadCloser with an empty bytes pipe. It adds this new out pipe to the Stdout broadcaster.