package
2.9.12+incompatible
Repository: https://github.com/grafana/loki.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

ChunkHeadFormatFor returns corresponding head block format for the given `chunkfmt`.
No description provided by the author
HeadFromCheckpoint handles reading any head block format and returning the desired form.
No description provided by the author
No description provided by the author
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

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
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.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

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.
No description provided by the author
LabelsPool is a matrix of bytes buffers used to store label names and values.
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.
SamplesPool pooling array of samples [512,1024,...,16k].
Snappy is the snappy compression pool.
No description provided by the author
No description provided by the author

# Structs

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.
No description provided by the author
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.
No description provided by the author