Documentation ¶
Index ¶
- func Register(create func() Backend)
- func WithDiscard() func(*Option)
- func WithHijack(hi http.Hijacker, upgrade bool) func(*Option)
- func WithID(id string) func(*Option)
- func WithRawFile() func(*Option)
- func WithRootDir(dir string) func(*Option)
- func WithStdinHijack() func(*Option)
- type Backend
- type Cache
- type ContainerIO
- type IO
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHijack ¶
WithHijack specified the hijack backend.
func WithRootDir ¶
WithRootDir specified the container's root dir.
func WithStdinHijack ¶
func WithStdinHijack() func(*Option)
WithStdinHijack sepcified the stdin with hijack.
Types ¶
type Backend ¶
type Backend interface { // Name defines the backend's name. Name() string // Init initializes the backend io. Init(opt *Option) error // Out returns the stdout/stderr. Out() io.Writer // In returns the stdin. In() io.Reader // Close closes the io. Close() error }
Backend defines the real output/input of the container's stdio.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache saves the all container's io.
type ContainerIO ¶
type ContainerIO struct { Option // contains filtered or unexported fields }
ContainerIO used to control the container's stdio.
func (*ContainerIO) Close ¶
func (io *ContainerIO) Close() error
Close implements the standard Close interface.
func (*ContainerIO) OpenStdin ¶
func (io *ContainerIO) OpenStdin() bool
OpenStdin returns open container's stdin or not.
type IO ¶
type IO struct { Stdout *ContainerIO Stderr *ContainerIO Stdin *ContainerIO }
IO wraps the three container's ios of stdout, stderr, stdin.
Click to show internal directories.
Click to hide internal directories.