Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attach ¶
Attach allows callers to reattach to running tasks
There should only be one reader for a task's IO set because fifo's can only be read from one reader or the output will be sent only to the first reads
type Config ¶
type Config struct { // Terminal is true if one has been allocated Terminal bool // Stdin path Stdin string // Stdout path Stdout string // Stderr path Stderr string }
Config holds the IO configurations.
type Creator ¶
Creator creates new IO sets for a task
func LogFile ¶ added in v1.2.0
LogFile creates a file on disk that logs the task's STDOUT,STDERR. If the log file already exists, the logs will be appended to the file.
func NewCreator ¶
NewCreator returns an IO creator from the options
type DirectIO ¶
type DirectIO struct {
// contains filtered or unexported fields
}
DirectIO allows task IO to be handled externally by the caller
func NewDirectIO ¶
func NewDirectIO(stdin io.WriteCloser, stdout, stderr io.ReadCloser, terminal bool) *DirectIO
NewDirectIO returns an IO implementation that exposes the IO streams as io.ReadCloser and io.WriteCloser.
func NewDirectIOFromFIFOSet ¶ added in v1.2.4
func NewDirectIOFromFIFOSet(ctx context.Context, stdin io.WriteCloser, stdout, stderr io.ReadCloser, fifos *FIFOSet) *DirectIO
NewDirectIOFromFIFOSet returns an IO implementation that exposes the IO streams as io.ReadCloser and io.WriteCloser.
type FIFOSet ¶
type FIFOSet struct { Config // contains filtered or unexported fields }
FIFOSet is a set of file paths to FIFOs for a task's standard IO streams
func NewFIFOSet ¶
NewFIFOSet returns a new FIFOSet from a Config and a close function
func NewFIFOSetInDir ¶
NewFIFOSetInDir returns a new set of fifos for the task
type IO ¶
type IO interface { // Config returns the IO configuration. Config() Config // Cancel aborts all current io operations. Cancel() // Wait blocks until all io copy operations have completed. Wait() // Close cleans up all open io resources. Cancel() is always called before // Close() Close() error }
IO holds the io information for a task or process
type Opt ¶
type Opt func(*Streams)
Opt customize options for creating a Creator or Attach
func WithFIFODir ¶
WithFIFODir sets the fifo directory. e.g. "/run/containerd/fifo", "/run/users/1001/containerd/fifo"