mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-20 09:56:47 +02:00
api/reader.go: Document io.EOF
This commit is contained in:
parent
d789b6a294
commit
daa89cf372
1 changed files with 4 additions and 1 deletions
|
|
@ -8,10 +8,13 @@ type Reader interface {
|
||||||
// Read a message from a channel.
|
// Read a message from a channel.
|
||||||
// Read may block until a message is ready or an error occured.
|
// Read may block until a message is ready or an error occured.
|
||||||
//
|
//
|
||||||
|
// io.EOF is returned from a reader when there is no more data to be read.
|
||||||
|
// If Read returns io.EOF all subsequent calls must also return io.EOF
|
||||||
|
//
|
||||||
// This function should be designed to handle concurrent calls. eg. thread safe.
|
// This function should be designed to handle concurrent calls. eg. thread safe.
|
||||||
Read(channel Channel) ([]byte, error)
|
Read(channel Channel) ([]byte, error)
|
||||||
|
|
||||||
// Close closes the reader
|
// Close closes the reader
|
||||||
// Any blocked Read operations will be unblocked.
|
// Any blocked Read operations will be unblocked and return io.EOF
|
||||||
Close() error
|
Close() error
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue