io

package
v0.9.237 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteIOSlave

func DeleteIOSlave(pid *uint32)

DeleteIOSlave deletes the slave associated with a PID. Uses the PID value of pointer at the time of the call.

func NewStreamIOMaster

func NewStreamIOMaster(
	slave grpc.BidiStreamingClient[daemon.AttachReq, daemon.AttachResp],
) (stdIn *StreamIOWriter, stdOut *StreamIOReader, stdErr *StreamIOReader, exitCode chan int, errors chan error)

func NewStreamIOSlave

func NewStreamIOSlave(
	ctx context.Context,
	wg *sync.WaitGroup,
	pid uint32,
	exitCode chan int,
) (stdIn *StreamIOReader, stdOut *StreamIOWriter, stdErr *StreamIOWriter)

func SetIOSlave

func SetIOSlave(pid uint32, slave *StreamIOSlave)

SetIOSlave sets the slave associated with a PID.

func SetIOSlavePID

func SetIOSlavePID(oldId uint32, pid *uint32)

SetIOSlavePID updates the PID of an existing slave. Uses the PID value of pointer at the time of the call.

Types

type StreamIOMaster

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

type StreamIOReader

type StreamIOReader struct {
	io.Reader
	io.WriterTo
	// contains filtered or unexported fields
}

func (*StreamIOReader) Read

func (s *StreamIOReader) Read(p []byte) (n int, err error)

func (*StreamIOReader) WriteTo

func (s *StreamIOReader) WriteTo(w io.Writer) (n int64, err error)

type StreamIOSlave

type StreamIOSlave struct {
	PID uint32
	// contains filtered or unexported fields
}

func GetIOSlave

func GetIOSlave(pid uint32) *StreamIOSlave

GetIOSlave returns the slave associated with a PID.

func (*StreamIOSlave) Attach

Attach attaches a master stream to the slave.

type StreamIOWriter

type StreamIOWriter struct {
	io.WriteCloser
	io.ReaderFrom
	// contains filtered or unexported fields
}

func (*StreamIOWriter) Close

func (s *StreamIOWriter) Close() error

func (*StreamIOWriter) ReadFrom

func (s *StreamIOWriter) ReadFrom(r io.Reader) (n int64, err error)

func (*StreamIOWriter) Write

func (s *StreamIOWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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