Documentation ¶
Index ¶
- Constants
- func ByteToUint32(data []byte) uint32
- func ByteToUint64(data []byte) uint64
- func CheckKey(path string, keysMap map[string]uint8) error
- func GetFiles(directory string) ([]string, error)
- func GetUint32(slice *[]byte, value *uint32) bool
- func GetUint64(slice *[]byte, value *uint64) bool
- func ReadAll(filePth string) ([]byte, error)
- type BlobLogFooter
- type BlobLogHeader
- type BlobLogRecord
- type CompressionType
- type ExpirationRange
- type ReadLevel
- type Reader
- func (r *Reader) GetNextByte() uint64
- func (r *Reader) ReadFooter(footer *BlobLogFooter)
- func (r *Reader) ReadHeader(header *BlobLogHeader) error
- func (r *Reader) ReadHeaderMock() error
- func (r *Reader) ReadRecord(record *BlobLogRecord) error
- func (r *Reader) ReadRecords() []BlobLogRecord
- func (r *Reader) ReadSlice(size uint64) ([]byte, bool)
- func (r *Reader) ResetNextByte()
Constants ¶
View Source
const ( Blob_Header_Size uint64 = 30 Blob_Key_Header_Size uint64 = 32 KErrorMessage_Header = "Error while decoding blob log header" KErrorMessage_Record = "Error while decoding blob log record" )
Variables ¶
This section is empty.
Functions ¶
func ByteToUint32 ¶
func ByteToUint64 ¶
Types ¶
type BlobLogFooter ¶
type BlobLogFooter struct {
// contains filtered or unexported fields
}
func (*BlobLogFooter) DecodeForm ¶
func (footer *BlobLogFooter) DecodeForm(slice []byte) error
type BlobLogHeader ¶
type BlobLogHeader struct {
// contains filtered or unexported fields
}
Format of blob log file header (30 bytes):
+--------------+---------+---------+-------+-------------+-------------------+ | magic number | version | cf id | flags | compression | expiration range | +--------------+---------+---------+-------+-------------+-------------------+ | Fixed32 | Fixed32 | Fixed32 | char | char | Fixed64 Fixed64 | +--------------+---------+---------+-------+-------------+-------------------+
func (*BlobLogHeader) DecodeForm ¶
func (header *BlobLogHeader) DecodeForm(src []byte) error
type BlobLogRecord ¶
type BlobLogRecord struct {
// contains filtered or unexported fields
}
func (*BlobLogRecord) DecodeHeaderFrom ¶
func (record *BlobLogRecord) DecodeHeaderFrom(src []byte) error
func (*BlobLogRecord) GetKey ¶ added in v0.7.2
func (record *BlobLogRecord) GetKey() []byte
func (*BlobLogRecord) GetVaule ¶ added in v0.7.2
func (record *BlobLogRecord) GetVaule() []byte
type CompressionType ¶
type CompressionType uint8
const ( KNOCompression CompressionType = iota KSnappyCompression CompressionType = 1 KZlibCompression CompressionType = 2 KBZip2Compression CompressionType = 3 KLZ4Compression CompressionType = 4 KXpressCompression CompressionType = 5 )
func GetCompressionType ¶
func GetCompressionType(compression uint8) CompressionType
type ExpirationRange ¶
type ExpirationRange struct {
// contains filtered or unexported fields
}
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) GetNextByte ¶
func (*Reader) ReadFooter ¶
func (r *Reader) ReadFooter(footer *BlobLogFooter)
func (*Reader) ReadHeader ¶
func (r *Reader) ReadHeader(header *BlobLogHeader) error
func (*Reader) ReadHeaderMock ¶
func (*Reader) ReadRecord ¶
func (r *Reader) ReadRecord(record *BlobLogRecord) error
func (*Reader) ReadRecords ¶
func (r *Reader) ReadRecords() []BlobLogRecord
func (*Reader) ResetNextByte ¶
func (r *Reader) ResetNextByte()
Click to show internal directories.
Click to hide internal directories.