Documentation
¶
Index ¶
Constants ¶
View Source
const PollInterval = 100 * time.Millisecond
Variables ¶
View Source
var ( ErrMaxExceeded = errors.New("max exceeded") ErrEndPagination = errors.New("no more items to paginate") )
Functions ¶
Types ¶
type FilePaginator ¶
type FilePaginator struct {
Max uint64 // Maximum offset
Follow bool // Begin at the end
Path string // Path to file
// contains filtered or unexported fields
}
FilePaginator paginates requests to the HTTP operator endpoint sending the response as fileData on the data channel. If max is a negative number paginate forever or until a message is received at f.cancel. Otherwise find the length of the file and paginate until we reach that position.
func (*FilePaginator) Close ¶
func (f *FilePaginator) Close()
Click to show internal directories.
Click to hide internal directories.