Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rereader ¶
type Rereader struct {
// contains filtered or unexported fields
}
Rereader has the ability to read the same io.Reader multiple times. There are currently some limitations to the design:
- Reset MUST be called in order to Re-Read the reader.
- Reset MUST be called after the ReReader is exausted (Read will return an io.EOF error).
- Concurrent reads are not supported.
func NewRereader ¶
NewRereader returns a new re-reader and closer that wraps the given reader. The re-reader consumes the given reader on demand, recording the entire stream so it can be replayed. The re-reader is suitable for retries. The re-reader does not support concurrent consumers, as would be necessary for speculative retries or fanout requests.
Click to show internal directories.
Click to hide internal directories.