Documentation
¶
Index ¶
- Constants
- Variables
- func CompressionFromExt(path string) (string, error)
- func DeleteIOSlave(pid *uint32)
- func ExtForCompression(compression string) (string, error)
- func IsPipe(fd uintptr) (bool, error)
- func NewCompressionReader(reader io.Reader, compression string) (io.ReadCloser, error)
- func NewCompressionWriter(writer io.Writer, compression string) (io.WriteCloser, error)
- func NewStreamIOMaster(slave grpc.BidiStreamingClient[daemon.AttachReq, daemon.AttachResp]) (stdIn *StreamIOWriter, stdOut *StreamIOReader, stdErr *StreamIOReader, ...)
- func NewStreamIOSlave(ctx context.Context, wg *sync.WaitGroup, pid uint32, exitCode chan int) (stdIn *StreamIOReader, stdOut *StreamIOWriter, stdErr *StreamIOWriter)
- func SetIOSlave(pid uint32, slave *StreamIOSlave)
- func SetIOSlavePID(oldId uint32, pid *uint32)
- func Splice(srcFd, dstFd uintptr) (int64, error)
- type NopReadCloser
- type NopWriteCloser
- type StreamIOMaster
- type StreamIOReader
- type StreamIOSlave
- type StreamIOWriter
Constants ¶
View Source
const ( BYTE = 1.0 << (10 * iota) KIBIBYTE MEBIBYTE GIBIBYTE )
View Source
const CHUNK_SIZE = 4 * MEBIBYTE
Variables ¶
Functions ¶
func CompressionFromExt ¶ added in v0.9.238
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 ExtForCompression ¶ added in v0.9.238
func NewCompressionReader ¶ added in v0.9.238
func NewCompressionWriter ¶ added in v0.9.238
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 ¶
SetIOSlavePID updates the PID of an existing slave. Uses the PID value of pointer at the time of the call.
func Splice ¶ added in v0.9.238
Splice copies data from srcFd to dstFd using the splice system call, until EOF is reached. which moves data between two file descriptors without copying it b/w kernel and user space. One of the file descriptors must be a pipe. Check out splice(2) man page for more information.
Types ¶
type NopReadCloser ¶ added in v0.9.238
func (NopReadCloser) Close ¶ added in v0.9.238
func (NopReadCloser) Close() error
type NopWriteCloser ¶ added in v0.9.238
func (NopWriteCloser) Close ¶ added in v0.9.238
func (NopWriteCloser) Close() error
type StreamIOMaster ¶
type StreamIOMaster struct {
// contains filtered or unexported fields
}
type StreamIOReader ¶
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 ¶
func (s *StreamIOSlave) Attach( ctx context.Context, master grpc.BidiStreamingServer[daemon.AttachReq, daemon.AttachResp], ) error
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
Click to show internal directories.
Click to hide internal directories.