Documentation
¶
Index ¶
- Constants
- type Codec
- type DocBlock
- func (b DocBlock) CalcLen()
- func (b DocBlock) Codec() Codec
- func (b DocBlock) DecompressTo(dst []byte) ([]byte, error)
- func (b DocBlock) FullLen() uint64
- func (b DocBlock) GetExt1() uint64
- func (b DocBlock) GetExt2() uint64
- func (b DocBlock) Len() uint64
- func (b DocBlock) Payload() []byte
- func (b DocBlock) RawLen() uint64
- func (b DocBlock) SetCodec(codecVal Codec)
- func (b DocBlock) SetExt1(x uint64)
- func (b DocBlock) SetExt2(x uint64)
- func (b DocBlock) SetLen(val uint64)
- func (b DocBlock) SetRawLen(x uint64)
- type DocBlocksReader
- type DocsReader
- type ImmutableFile
- type IndexBlockHeader
- func (b IndexBlockHeader) Codec() Codec
- func (b IndexBlockHeader) GetExt1() uint64
- func (b IndexBlockHeader) GetExt2() uint64
- func (b IndexBlockHeader) GetPos() uint64
- func (b IndexBlockHeader) Len() uint32
- func (b IndexBlockHeader) RawLen() uint32
- func (b IndexBlockHeader) SetCodec(codecVal Codec)
- func (b IndexBlockHeader) SetExt1(x uint64)
- func (b IndexBlockHeader) SetExt2(x uint64)
- func (b IndexBlockHeader) SetLen(val uint32)
- func (b IndexBlockHeader) SetPos(x uint64)
- func (b IndexBlockHeader) SetRawLen(x uint32)
- type IndexReader
- type ReadLimiter
- type Uploader
Constants ¶
View Source
const (
DocBlockHeaderLen = 33
)
View Source
const (
IndexBlockHeaderSize = 33
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocBlock ¶
type DocBlock []byte
func PackDocBlock ¶
func (DocBlock) DecompressTo ¶
DecompressTo always put the result in `dst` regardless of whether unpacking is required or part of the DocBlock can be enough.
So DocBlock does not share the same data with `dst` and can be used safely
type DocBlocksReader ¶
type DocBlocksReader struct {
// contains filtered or unexported fields
}
func NewDocBlocksReader ¶
func NewDocBlocksReader(limiter *ReadLimiter, reader io.ReaderAt) DocBlocksReader
func (*DocBlocksReader) ReadDocBlock ¶
func (r *DocBlocksReader) ReadDocBlock(offset int64) ([]byte, uint64, error)
func (*DocBlocksReader) ReadDocBlockPayload ¶
func (r *DocBlocksReader) ReadDocBlockPayload(offset int64) ([]byte, uint64, error)
type DocsReader ¶
type DocsReader struct {
// contains filtered or unexported fields
}
func NewDocsReader ¶
func NewDocsReader(limiter *ReadLimiter, reader io.ReaderAt, docsCache *cache.Cache[[]byte]) DocsReader
func (*DocsReader) ReadDocs ¶
func (r *DocsReader) ReadDocs(blockOffset uint64, docOffsets []uint64) ([][]byte, error)
func (*DocsReader) ReadDocsFunc ¶
type ImmutableFile ¶
type IndexBlockHeader ¶
type IndexBlockHeader []byte
func NewEmptyIndexBlockHeader ¶
func NewEmptyIndexBlockHeader() IndexBlockHeader
func NewIndexBlockHeader ¶
func NewIndexBlockHeader(pos int64, ext1, ext2 uint64, size, rawSize uint32, codec Codec) IndexBlockHeader
func (IndexBlockHeader) Codec ¶
func (b IndexBlockHeader) Codec() Codec
func (IndexBlockHeader) GetExt1 ¶
func (b IndexBlockHeader) GetExt1() uint64
func (IndexBlockHeader) GetExt2 ¶
func (b IndexBlockHeader) GetExt2() uint64
func (IndexBlockHeader) GetPos ¶
func (b IndexBlockHeader) GetPos() uint64
func (IndexBlockHeader) Len ¶
func (b IndexBlockHeader) Len() uint32
func (IndexBlockHeader) RawLen ¶
func (b IndexBlockHeader) RawLen() uint32
func (IndexBlockHeader) SetCodec ¶
func (b IndexBlockHeader) SetCodec(codecVal Codec)
func (IndexBlockHeader) SetExt1 ¶
func (b IndexBlockHeader) SetExt1(x uint64)
func (IndexBlockHeader) SetExt2 ¶
func (b IndexBlockHeader) SetExt2(x uint64)
func (IndexBlockHeader) SetLen ¶
func (b IndexBlockHeader) SetLen(val uint32)
func (IndexBlockHeader) SetPos ¶
func (b IndexBlockHeader) SetPos(x uint64)
func (IndexBlockHeader) SetRawLen ¶
func (b IndexBlockHeader) SetRawLen(x uint32)
type IndexReader ¶
type IndexReader struct {
// contains filtered or unexported fields
}
func NewIndexReader ¶
func NewIndexReader( limiter *ReadLimiter, readerName string, reader io.ReaderAt, registryCache *cache.Cache[[]byte], ) IndexReader
func (*IndexReader) GetBlockHeader ¶
func (r *IndexReader) GetBlockHeader(index uint32) (IndexBlockHeader, error)
func (*IndexReader) ReadIndexBlock ¶
type ReadLimiter ¶
type ReadLimiter struct {
// contains filtered or unexported fields
}
func NewReadLimiter ¶
func NewReadLimiter(maxReadsNum int, counter prometheus.Counter) *ReadLimiter
Source Files
¶
Click to show internal directories.
Click to hide internal directories.