storage

package
v4.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2025 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	// Offset is the position within the .gpf file
	Offset uint64
	// Len is the length of data as it is on disk
	Len uint32
	// RawLen is the original (uncompressed) length of data
	RawLen uint32
	// EncoderType is the type of encoder which was used to compress data
	EncoderType encoders.Type
}

Block denotes a block of goprobe data

func (Block) IsEmpty

func (b Block) IsEmpty() bool

IsEmpty checks if the block does not store any data

type BlockAtTime

type BlockAtTime struct {
	Timestamp int64
	Block
}

BlockAtTime denotes a block / timestamp pair for easier iteration

type BlockHeader

type BlockHeader struct {
	BlockList     []BlockAtTime
	CurrentOffset uint64
	// contains filtered or unexported fields
}

BlockHeader denotes a list of blocks pertaining to a storage backend

func (*BlockHeader) AddBlock

func (b *BlockHeader) AddBlock(ts int64, block Block)

AddBlock adds a new block to the header

func (*BlockHeader) BlockAtTime

func (b *BlockHeader) BlockAtTime(ts int64) (Block, bool)

BlockAtTime returns the block for a given timestamp (if exists)

func (*BlockHeader) BlockIndex

func (b *BlockHeader) BlockIndex(ts int64) (idx int, found bool)

BlockIndex returns the index of the block in the BlockList for a given timestamp (if exists)

func (*BlockHeader) Blocks

func (b *BlockHeader) Blocks() []BlockAtTime

Blocks returns an ordered list of timestamps / blocks

func (*BlockHeader) BlocksAfter

func (b *BlockHeader) BlocksAfter(ts int64) (blocks []BlockAtTime, ind int)

BlocksAfter returns an ordered list all timestamps / blocks that occurred after a given timestamp (including ts). The second return ind indicates the index of the first block that is returned

func (*BlockHeader) BlocksBefore

func (b *BlockHeader) BlocksBefore(ts int64) []BlockAtTime

BlocksBefore returns an ordered list all timestamps / blocks that occurred before a given timestamp (including ts)

func (*BlockHeader) NBlocks

func (b *BlockHeader) NBlocks() int

NBlocks returns the number of blocks

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL