Documentation ¶
Index ¶
- Variables
- type ECommitError
- type InplaceWAL_File
- type JournalDataManager
- func (j *JournalDataManager) Alloc(size int64) (int64, error)
- func (j *JournalDataManager) Close() error
- func (j *JournalDataManager) Commit() error
- func (j *JournalDataManager) DirectFile() file.File
- func (j *JournalDataManager) Free(off int64) error
- func (j *JournalDataManager) GetWalSize() int64
- func (j *JournalDataManager) RollbackFile() file.File
- func (j *JournalDataManager) UsableSize(off int64) (int64, error)
- type JournalFile
- func (j *JournalFile) Commit(rws WAL_Target) error
- func (j *JournalFile) GetWalSize() int64
- func (j *JournalFile) ReadAt(p []byte, off int64) (n int, err error)
- func (j *JournalFile) Stat() (os.FileInfo, error)
- func (j *JournalFile) String() string
- func (j *JournalFile) Truncate(i int64) error
- func (j *JournalFile) WriteAt(p []byte, off int64) (n int, err error)
- type OffsetFile
- type ReaderAtWriterAt
- type WAL_Target
- type WAL_Target_Ex
Constants ¶
This section is empty.
Variables ¶
View Source
var ENOSPACE = errors.New("ENOSPACE")
Functions ¶
This section is empty.
Types ¶
type ECommitError ¶
type ECommitError struct{ Inner error }
func (*ECommitError) Error ¶
func (e *ECommitError) Error() string
type InplaceWAL_File ¶
type InplaceWAL_File struct {
// contains filtered or unexported fields
}
func NewInplaceWAL_File ¶
func NewInplaceWAL_File(w ReaderAtWriterAt, max int64) *InplaceWAL_File
func (*InplaceWAL_File) Seek ¶
func (i *InplaceWAL_File) Seek(offset int64, whence int) (int64, error)
func (*InplaceWAL_File) SetHoldSize ¶
func (i *InplaceWAL_File) SetHoldSize(on bool) error
func (*InplaceWAL_File) Truncate ¶
func (i *InplaceWAL_File) Truncate(size int64) error
type JournalDataManager ¶
type JournalDataManager struct {
// contains filtered or unexported fields
}
func NewJournalDataManager ¶
func NewJournalDataManager(f file.File, w WAL_Target) (*JournalDataManager, error)
func (*JournalDataManager) Close ¶
func (j *JournalDataManager) Close() error
func (*JournalDataManager) Commit ¶
func (j *JournalDataManager) Commit() error
func (*JournalDataManager) DirectFile ¶
func (j *JournalDataManager) DirectFile() file.File
func (*JournalDataManager) Free ¶
func (j *JournalDataManager) Free(off int64) error
func (*JournalDataManager) GetWalSize ¶
func (j *JournalDataManager) GetWalSize() int64
func (*JournalDataManager) RollbackFile ¶
func (j *JournalDataManager) RollbackFile() file.File
func (*JournalDataManager) UsableSize ¶
func (j *JournalDataManager) UsableSize(off int64) (int64, error)
type JournalFile ¶
A file-Wrapper that features Write ahead logging.
func OpenJournalFile ¶
func OpenJournalFile(f file.File, w WAL_Target) (*JournalFile, error)
func (*JournalFile) Commit ¶
func (j *JournalFile) Commit(rws WAL_Target) error
func (*JournalFile) GetWalSize ¶
func (j *JournalFile) GetWalSize() int64
Get the estiminated size of the Write-Ahead log in bytes.
func (*JournalFile) String ¶
func (j *JournalFile) String() string
func (*JournalFile) Truncate ¶
func (j *JournalFile) Truncate(i int64) error
type OffsetFile ¶
func (*OffsetFile) Truncate ¶
func (o *OffsetFile) Truncate(i int64) error
type WAL_Target ¶
type WAL_Target interface { io.ReadWriteSeeker Truncate(int64) error }
type WAL_Target_Ex ¶
type WAL_Target_Ex interface { WAL_Target SetHoldSize(on bool) error }
Click to show internal directories.
Click to hide internal directories.