Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffered ¶
Buffered keeps track of one or more observers watching the progress of an operation. For example, if multiple clients are trying to pull an image, they share a Buffered struct for the download operation.
func NewBuffered ¶
func NewBuffered() *Buffered
NewBuffered returns an initialized Buffered structure.
func (*Buffered) Add ¶
Add adds an observer to the broadcaster. The new observer receives the data from the history buffer, and also all subsequent data.
func (*Buffered) Close ¶
func (broadcaster *Buffered) Close()
Close signals to all observers that the operation has finished. It causes all calls to Wait to return nil.
func (*Buffered) CloseWithError ¶
CloseWithError signals to all observers that the operation has finished. Its argument is a result that should be returned to waiters blocking on Wait.
type Unbuffered ¶
type Unbuffered struct {
// contains filtered or unexported fields
}
Unbuffered accumulates multiple io.WriteCloser by stream.
func (*Unbuffered) Add ¶
func (w *Unbuffered) Add(writer io.WriteCloser)
Add adds new io.WriteCloser.
func (*Unbuffered) Clean ¶
func (w *Unbuffered) Clean() error
Clean closes and removes all writers. Last non-eol-terminated part of data will be saved.