v0.0.0-...-e560ebb Latest Latest

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0



Package fifo implements FIFO utilities for skylab_swarming_worker.



This section is empty.


This section is empty.


This section is empty.


type Copier

type Copier struct {
	// contains filtered or unexported fields

Copier encapsulates the operation of copying from a FIFO.

func NewCopier

func NewCopier(w io.Writer, path string) (*Copier, error)

NewCopier creates a FIFO whose data is copied to the Writer. The copying is done in a goroutine. The returned Copier must be closed to flush and terminate the copying. This function does not block on opening the FIFO for reading.

func (*Copier) Close

func (fc *Copier) Close() error

Close closes the FIFO and waits for copying to finish. Repeated calls do nothing.

This closes the write fd for the FIFO that we hold and waits for the copying goroutine to read EOF. The FIFO yields EOF only when all writers have been closed. Thus, this will block on any writers that are still holding fds.

Jump to

Keyboard shortcuts

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