mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-17 04:30:03 +02:00
rename transport to api
This commit is contained in:
parent
044ed4e891
commit
102045e47e
15 changed files with 40 additions and 40 deletions
17
api/reader.go
Normal file
17
api/reader.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package api
|
||||
|
||||
// Reader interface defines the required method
|
||||
// to read a message from an channel.
|
||||
//
|
||||
// This is a low-level interface typically implemented by transport drivers.
|
||||
type Reader interface {
|
||||
// Read a message from a channel.
|
||||
// Read may block until a message is ready or an error occured.
|
||||
//
|
||||
// This function should be designed to handle concurrent calls. eg. thread safe.
|
||||
Read(channel Channel) ([]byte, error)
|
||||
|
||||
// Close closes the reader
|
||||
// Any blocked Read operations will be unblocked.
|
||||
Close() error
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue