Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToInt64(buf []byte) int64
- func Int64ToBytes(i int64) []byte
- type Levlog
- func (levlog *Levlog) Close()
- func (levlog *Levlog) DelFirstPage() error
- func (levlog *Levlog) GetFirstPageNum() int64
- func (levlog *Levlog) GetLastPageNum() int64
- func (levlog *Levlog) GetLog(idx int64) (string, error)
- func (levlog *Levlog) GetLogs(start int64, end int64) ([]string, error)
- func (levlog *Levlog) GetLogsInPage(page int64) ([]string, error)
- func (levlog *Levlog) Log(logstr string) error
Constants ¶
View Source
const PageSize int64 = 20
var Index int64 = -1
Variables ¶
View Source
var ( //PRE_INDEX = "IDX-" NOW_INDEX_B = []byte("NOW_INDEX") FIR_INDEX_B = []byte("FIR_INDEX") )
Functions ¶
func BytesToInt64 ¶
func Int64ToBytes ¶
Types ¶
type Levlog ¶
type Levlog struct { Dbdir string DB *leveldb.DB DbLock *sync.RWMutex FirstIndex int64 NowIndex int64 }
func (*Levlog) DelFirstPage ¶
func (*Levlog) GetFirstPageNum ¶
func (*Levlog) GetLastPageNum ¶
Click to show internal directories.
Click to hide internal directories.