package
2.2.1+incompatible
Repository: https://github.com/metrico/loki-apache.git
Documentation: pkg.go.dev

# README

Chunk format

  |                 |             |
  | MagicNumber(4b) | version(1b) |
  |                 |             |
  --------------------------------------------------
  |         block-1 bytes         |  checksum (4b) |
  --------------------------------------------------
  |         block-2 bytes         |  checksum (4b) |
  --------------------------------------------------
  |         block-n bytes         |  checksum (4b) |
  --------------------------------------------------
  |         #blocks (uvarint)                      |
  --------------------------------------------------
  | #entries(uvarint) | mint, maxt (varint) | offset, len (uvarint) | uncompressedSize (uvarint) |
  ------------------------------------------------------------------------------------------------
  | #entries(uvarint) | mint, maxt (varint) | offset, len (uvarint) | uncompressedSize (uvarint) |
  ------------------------------------------------------------------------------------------------
  | #entries(uvarint) | mint, maxt (varint) | offset, len (uvarint) | uncompressedSize (uvarint) |
  ------------------------------------------------------------------------------------------------
  | #entries(uvarint) | mint, maxt (varint) | offset, len (uvarint) | uncompressedSize (uvarint) |
  ------------------------------------------------------------------------------------------------
  |                      checksum(from #blocks)                     |
  -------------------------------------------------------------------
  | metasOffset - offset to the point with #blocks |
  --------------------------------------------------

# Functions

No description provided by the author
NewByteChunk returns a MemChunk on the passed bytes.
NewDumbChunk returns a new chunk that isn't very good.
NewFacade makes a new Facade.
NewMemChunk returns a new in-mem chunk.
ParseEncoding parses an chunk encoding (compression algorithm) by its name.
SupportedEncoding returns the list of supported Encoding.
UncompressedSize is a helper function to hide the type assertion kludge when wanting the uncompressed size of the Cortex interface encoding.Chunk.

# Constants

The different available encodings.
The different available encodings.
The different available encodings.
The different available encodings.
The different available encodings.
The different available encodings.
The different available encodings.
The different available encodings.
The different available encodings.
The different available encodings.
GzipLogChunk is a cortex encoding type for our chunks.
LogChunk is a cortex encoding type for our chunks.

# Variables

BufReaderPool is bufio.Reader pool.
BytesBufferPool is a bytes buffer used for lines decompressed.
EncodeBufferPool is a pool used to binary encode.
Errors returned by the chunk interface.
Errors returned by the chunk interface.
Errors returned by the chunk interface.
Errors returned by the chunk interface.
Errors returned by the chunk interface.
No description provided by the author
Gzip is the gnu zip compression pool.
Lz4_1M uses 1M buffer.
Lz4_256k uses 256k buffer.
Lz4_4M uses 4M buffer.
Lz4_64k is the l4z compression pool, with 64k buffer size.
Noop is the no compression pool.
Snappy is the snappy compression pool.
No description provided by the author

# Structs

BufioReaderPool is a bufio reader that uses sync.Pool.
Facade for compatibility with cortex chunk type, so we can use its chunk store.
FlatePool is a flate compression pool.
GzipPool is a gun zip compression pool.
No description provided by the author
MemChunk implements compressed log chunks.
No description provided by the author
No description provided by the author
GzipPool is a gun zip compression pool.

# Interfaces

Block is a chunk block.
Chunk is the interface for the compressed logs chunk format.
ReaderPool similar to WriterPool but for reading chunks.
WriterPool is a pool of io.Writer This is used by every chunk to avoid unnecessary allocations.

# Type aliases

Encoding is the identifier for a chunk encoding.