Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backtracker ¶
type Backtracker interface { io.Reader // Returns the current offset (doesn't count backtracking) Offset() int64 // Return amount of bytes that can be backtracked Cached() int64 // Backtrack n bytes Backtrack(n int64) error // Advance n bytes Discard(n int64) error NumCacheHits() int64 NumCacheMiss() int64 CachedBytesServed() int64 TotalBytesServed() int64 }
Backtracker allows reads from an io.Reader while remembering the last N bytes of data. Backtrack() can then be called, to read those bytes again.
Click to show internal directories.
Click to hide internal directories.