journal

package
v0.0.0-...-d40ae05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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) Read

func (i *InplaceWAL_File) Read(b []byte) (n int, e error)

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

func (*InplaceWAL_File) Write

func (i *InplaceWAL_File) Write(b []byte) (n int, e 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) Alloc

func (j *JournalDataManager) Alloc(size int64) (int64, 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

type JournalFile struct {
	file.File
	// contains filtered or unexported fields
}

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) ReadAt

func (j *JournalFile) ReadAt(p []byte, off int64) (n int, err error)

func (*JournalFile) Stat

func (j *JournalFile) Stat() (os.FileInfo, error)

func (*JournalFile) String

func (j *JournalFile) String() string

func (*JournalFile) Truncate

func (j *JournalFile) Truncate(i int64) error

func (*JournalFile) WriteAt

func (j *JournalFile) WriteAt(p []byte, off int64) (n int, err error)

type OffsetFile

type OffsetFile struct {
	file.File
	Offset int64
}

func (*OffsetFile) ReadAt

func (o *OffsetFile) ReadAt(p []byte, off int64) (n int, err error)

func (*OffsetFile) Stat

func (o *OffsetFile) Stat() (os.FileInfo, error)

func (*OffsetFile) Truncate

func (o *OffsetFile) Truncate(i int64) error

func (*OffsetFile) WriteAt

func (o *OffsetFile) WriteAt(p []byte, off int64) (n int, err error)

type ReaderAtWriterAt

type ReaderAtWriterAt interface {
	io.ReaderAt
	io.WriterAt
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL