Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileCache ¶
type FileCache struct {
// contains filtered or unexported fields
}
FileCache stores rows from the wire and puts excess into a temporary file
func NewFileCache ¶
NewFileCache returns a file cache with a set row limit
func (*FileCache) AddRow ¶
func (f *FileCache) AddRow(msg *msgs.BEDataRowMsg) error
AddRow adds a row to the cache
func (*FileCache) Finalize ¶
Finalize signals the end of rows from the wire and readies the cache for reading
func (*FileCache) GetRow ¶
func (f *FileCache) GetRow() *msgs.BEDataRowMsg
GetRow pulls a row message out of the cache, returning nil of none remain
func (*FileCache) Peek ¶
func (f *FileCache) Peek() *msgs.BEDataRowMsg
Peek returns the next row without changing the state
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
MemoryCache is a simple in memory row store
func NewMemoryCache ¶
func NewMemoryCache(size int) *MemoryCache
NewMemoryCache initializes the memory store with a given size, but it can continue to grow
func (*MemoryCache) AddRow ¶
func (m *MemoryCache) AddRow(msg *msgs.BEDataRowMsg) error
AddRow adds a row to the store
func (*MemoryCache) Close ¶
func (m *MemoryCache) Close() error
Close provides an opportunity to free resources, a noop for the memory cache
func (*MemoryCache) Finalize ¶
func (m *MemoryCache) Finalize() error
Finalize signals the end of new rows, a noop for the memory cache
func (*MemoryCache) GetRow ¶
func (m *MemoryCache) GetRow() *msgs.BEDataRowMsg
GetRow pulls a row from the cache, returning nil if none remain
func (*MemoryCache) Peek ¶
func (m *MemoryCache) Peek() *msgs.BEDataRowMsg
Peek returns the next row without changing the state