Documentation
¶
Index ¶
- func SyncDir(dir string) error
- type MmapFile
- func (m *MmapFile) AppendBuffer(offset uint32, buf []byte) error
- func (m *MmapFile) Bytes(off, sz int) ([]byte, error)
- func (m *MmapFile) Close() error
- func (m *MmapFile) Delete() error
- func (m *MmapFile) NewReader(offset int) io.Reader
- func (m *MmapFile) Read(b []byte, offset int64) (int, error)
- func (m *MmapFile) Sync() error
- func (m *MmapFile) Truncature(maxSz int64) error
- type VLogFile
- func (vlog *VLogFile) Close() error
- func (vlog *VLogFile) DecodeEntry(buf []byte, offset uint32) (*model.Entry, error)
- func (vlog *VLogFile) DoneWriting(offset uint32) error
- func (vlog *VLogFile) EncodeEntry(entry *model.Entry, out *bytes.Buffer) (int, error)
- func (vlog *VLogFile) FD() *os.File
- func (vlog *VLogFile) FileName() string
- func (vlog *VLogFile) Init() error
- func (vlog *VLogFile) Open(opt *utils.FileOptions) error
- func (vlog *VLogFile) Read(vptr *model.ValuePtr) (buf []byte, err error)
- func (vlog *VLogFile) Seek(offset int64, whence int) (ret int64, err error)
- func (vlog *VLogFile) SetSize(offset uint32)
- func (vlog *VLogFile) Size() int64
- func (vlog *VLogFile) Sync() error
- func (vlog *VLogFile) Truncate(offset int64) error
- func (vlog *VLogFile) Write(offset uint32, buf []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MmapFile ¶
func (*MmapFile) Truncature ¶
type VLogFile ¶
func (*VLogFile) DecodeEntry ¶
func (*VLogFile) DoneWriting ¶
func (*VLogFile) EncodeEntry ¶
EncodeEntry will encode entry to the buf layout of entry +--------+-----+-------+-------+ | header | key | value | crc32 | +--------+-----+-------+-------+
Click to show internal directories.
Click to hide internal directories.