package
3.4.2
Repository: https://github.com/grafana/loki.git
Documentation: pkg.go.dev

# README

Chunk v4 format

// Header
+-----------------------------------+
| Magic Number (uint32, 4 bytes)    |
+-----------------------------------+
| Version (1 byte)                  |
+-----------------------------------+
| Encoding (1 byte)                 |
+-----------------------------------+

// Blocks
+--------------------+----------------------------+
| block 1 (n bytes)  | checksum (uint32, 4 bytes) |
+--------------------+----------------------------+
| block 1 (n bytes)  | checksum (uint32, 4 bytes) |
+--------------------+----------------------------+
| ...                                             |
+--------------------+----------------------------+
| block N (n bytes)  | checksum (uint32, 4 bytes) |
+--------------------+----------------------------+

// Metas
+------------------------------------------------------------------------------------------------------------------------+
| #blocks (uvarint)                                                                                                      |
+--------------------+-----------------+-----------------+------------------+---------------+----------------------------+
| #entries (uvarint) | minTs (uvarint) | maxTs (uvarint) | offset (uvarint) | len (uvarint) | uncompressedSize (uvarint) |
+--------------------+-----------------+-----------------+------------------+---------------+----------------------------+
| #entries (uvarint) | minTs (uvarint) | maxTs (uvarint) | offset (uvarint) | len (uvarint) | uncompressedSize (uvarint) |
+--------------------+-----------------+-----------------+------------------+---------------+----------------------------+
| ...                                                                                                                    |
+--------------------+-----------------+-----------------+------------------+---------------+----------------------------+
| #entries (uvarint) | minTs (uvarint) | maxTs (uvarint) | offset (uvarint) | len (uvarint) | uncompressedSize (uvarint) |
+--------------------+-----------------+-----------------+------------------+---------------+----------------------------+
| checksum (uint32, 4 bytes)                                                                                             | 
+------------------------------------------------------------------------------------------------------------------------+

// Structured Metadata
+---------------------------------+
| #labels (uvarint)               |
+---------------+-----------------+
| len (uvarint) | value (n bytes) |
+---------------+-----------------+
| ...                             |
+---------------+-----------------+
| checksum (uint32, 4 bytes)      |
+---------------------------------+

// Footer
+-----------------------+--------------------------+
| len (uint64, 8 bytes) | offset (uint64, 8 bytes) |   // offset to Structured Metadata
+-----------------------+--------------------------+
| len (uint64, 8 bytes) | offset (uint64, 8 bytes) |   // offset to Metas
+-----------------------+--------------------------+

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

# Structs

Facade for compatibility with cortex chunk type, so we can use its chunk store.
MemChunk implements compressed log chunks.

# Interfaces

Block is a chunk block.
Chunk is the interface for the compressed logs chunk format.
No description provided by the author

# Type aliases

No description provided by the author