containerd/vendor/github.com/tonistiigi/fifo
Akihiro Suda 40d966f00e clean up unused nats code
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-02-20 05:28:09 +00:00
..
LICENSE Add vendoring to containerd master 2017-01-11 16:59:06 -05:00
fifo.go Add vendoring to containerd master 2017-01-11 16:59:06 -05:00
handle_linux.go Add vendoring to containerd master 2017-01-11 16:59:06 -05:00
handle_nolinux.go Add vendoring to containerd master 2017-01-11 16:59:06 -05:00
mkfifo_nosolaris.go Add vendoring to containerd master 2017-01-11 16:59:06 -05:00
mkfifo_solaris.go Add vendoring to containerd master 2017-01-11 16:59:06 -05:00
readme.md clean up unused nats code 2017-02-20 05:28:09 +00:00

readme.md

fifo

Go package for handling fifos in a sane way.

// OpenFifo opens a fifo. Returns io.ReadWriteCloser.
// Context can be used to cancel this function until open(2) has not returned.
// Accepted flags:
// - syscall.O_CREAT - create new fifo if one doesn't exist
// - syscall.O_RDONLY - open fifo only from reader side
// - syscall.O_WRONLY - open fifo only from writer side
// - syscall.O_RDWR - open fifo from both sides, never block on syscall level
// - syscall.O_NONBLOCK - return io.ReadWriteCloser even if other side of the
//     fifo isn't open. read/write will be connected after the actual fifo is
//     open or after fifo is closed.
func OpenFifo(ctx context.Context, fn string, flag int, perm os.FileMode) (io.ReadWriteCloser, error)


// Read from a fifo to a byte array.
func (f *fifo) Read(b []byte) (int, error)


// Write from byte array to a fifo.
func (f *fifo) Write(b []byte) (int, error)


// Close the fifo. Next reads/writes will error. This method can also be used
// before open(2) has returned and fifo was never opened.
func (f *fifo) Close() error