Documentation ¶
Index ¶
- Constants
- Variables
- func NewFacade(c Chunk) encoding.Chunk
- type Chunk
- type CompressionReader
- type CompressionWriter
- type Encoding
- type Facade
- type LazyChunk
- type MemChunk
- func (c *MemChunk) Append(entry *logproto.Entry) error
- func (c *MemChunk) Bounds() (fromT, toT time.Time)
- func (c *MemChunk) Bytes() ([]byte, error)
- func (c *MemChunk) Close() error
- func (c *MemChunk) Encoding() Encoding
- func (c *MemChunk) Iterator(mintT, maxtT time.Time, direction logproto.Direction) (iter.EntryIterator, error)
- func (c *MemChunk) Size() int
- func (c *MemChunk) SpaceFor(*logproto.Entry) bool
Constants ¶
View Source
const GzipLogChunk = encoding.Encoding(128)
GzipLogChunk is a cortex encoding type for our chunks.
Variables ¶
View Source
var ( ErrChunkFull = errors.New("chunk full") ErrOutOfOrder = errors.New("entry out of order") ErrInvalidSize = errors.New("invalid size") ErrInvalidFlag = errors.New("invalid flag") ErrInvalidChecksum = errors.New("invalid checksum") )
Errors returned by the chunk interface.
Functions ¶
Types ¶
type Chunk ¶
type Chunk interface { Bounds() (time.Time, time.Time) SpaceFor(*logproto.Entry) bool Append(*logproto.Entry) error Iterator(from, through time.Time, direction logproto.Direction) (iter.EntryIterator, error) Size() int Bytes() ([]byte, error) }
Chunk is the interface for the compressed logs chunk format.
func NewDumbChunk ¶
func NewDumbChunk() Chunk
NewDumbChunk returns a new chunk that isn't very good.
type CompressionReader ¶
CompressionReader reads the compressed data.
type CompressionWriter ¶
type CompressionWriter interface { Write(p []byte) (int, error) Close() error Flush() error Reset(w io.Writer) }
CompressionWriter is the writer that compresses the data passed to it.
type Facade ¶
Facade for compatibility with cortex chunk type, so we can use it's chunk store.
func (*Facade) UnmarshalFromBuf ¶
UnmarshalFromBuf implements encoding.Chunk.
type MemChunk ¶
type MemChunk struct {
// contains filtered or unexported fields
}
MemChunk implements compressed log chunks.
func NewByteChunk ¶
NewByteChunk returns a MemChunk on the passed bytes.
func NewMemChunk ¶
NewMemChunk returns a new in-mem chunk for query.
func NewMemChunkSize ¶
NewMemChunkSize returns a new in-mem chunk. Mainly for config push size.
Click to show internal directories.
Click to hide internal directories.