Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pager ¶ added in v0.3.2
type Pager struct {
// contains filtered or unexported fields
}
Pager is a page buffer that is backed by an os.File
func NewPagerSize ¶ added in v0.3.2
NewPagerSize returns a new Pager with a custom page size and buffer size. The bufferSize is the maximum amount of memory dedicated to individual pages. Setting pageSize and bufferSize to zero will use their defaults, which are 4096 and 8 MB respectively. Custom values are rounded up to the nearest power of 2.
func (*Pager) Flush ¶ added in v0.3.2
Flush writes any unwritten buffered data to the underlying file.
func (*Pager) ReadAt ¶ added in v0.3.2
The byte offset off and len(b) must fall within the range of the size of the underlying file from Open or Create, otherwise an error is returned. ReadAt reads len(b) bytes from the File starting at byte offset off. It returns the number of bytes read and the error, if any. ReadAt returns a non-nil error when n < len(b).