Documentation ¶
Index ¶
- Constants
- func NewFdByBuffer(fdSet *fdManager, cacheItem *fileCacheItem) *fileDescription
- func NewFdByFile(file *os.File) *fileDescription
- type DataParser
- type FileManager
- func (fm *FileManager) Close() error
- func (fm *FileManager) DeleteTo(location *Location) error
- func (fm *FileManager) Flush(startLocation *Location, targetLocation *Location, buf []byte) error
- func (fm *FileManager) GetCacheStatusList() []interfaces.DBStatus
- func (fm *FileManager) GetNextLocation(location *Location) (*Location, error)
- func (fm *FileManager) LatestLocation() *Location
- func (fm *FileManager) NextFlushStartLocation() *Location
- func (fm *FileManager) Read(location *Location) ([]byte, *Location, error)
- func (fm *FileManager) ReadRange(startLocation *Location, endLocation *Location, parser DataParser)
- func (fm *FileManager) ReadRaw(startLocation *Location, buf []byte) (*Location, int, error)
- func (fm *FileManager) SetLog(h log15.Handler)
- func (fm *FileManager) SetNextFlushStartLocation(location *Location)
- func (fm *FileManager) Write(buf []byte) (*Location, error)
- type Location
Constants ¶
View Source
const (
LocationSize = 12
)
Variables ¶
This section is empty.
Functions ¶
func NewFdByBuffer ¶
func NewFdByBuffer(fdSet *fdManager, cacheItem *fileCacheItem) *fileDescription
func NewFdByFile ¶
Types ¶
type DataParser ¶
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
func NewFileManager ¶
func NewFileManager(dirName string, fileSize int64, cacheCount int) (*FileManager, error)
func (*FileManager) Close ¶
func (fm *FileManager) Close() error
func (*FileManager) DeleteTo ¶
func (fm *FileManager) DeleteTo(location *Location) error
func (*FileManager) Flush ¶
func (fm *FileManager) Flush(startLocation *Location, targetLocation *Location, buf []byte) error
func (*FileManager) GetCacheStatusList ¶
func (fm *FileManager) GetCacheStatusList() []interfaces.DBStatus
func (*FileManager) GetNextLocation ¶
func (fm *FileManager) GetNextLocation(location *Location) (*Location, error)
func (*FileManager) LatestLocation ¶
func (fm *FileManager) LatestLocation() *Location
func (*FileManager) NextFlushStartLocation ¶
func (fm *FileManager) NextFlushStartLocation() *Location
func (*FileManager) Read ¶
func (fm *FileManager) Read(location *Location) ([]byte, *Location, error)
func (*FileManager) ReadRange ¶
func (fm *FileManager) ReadRange(startLocation *Location, endLocation *Location, parser DataParser)
func (*FileManager) SetLog ¶
func (fm *FileManager) SetLog(h log15.Handler)
func (*FileManager) SetNextFlushStartLocation ¶
func (fm *FileManager) SetNextFlushStartLocation(location *Location)
type Location ¶
func NewLocation ¶
Click to show internal directories.
Click to hide internal directories.