Documentation
¶
Index ¶
- type Block
- type BlockAtTime
- type BlockHeader
- func (b *BlockHeader) AddBlock(ts int64, block Block)
- func (b *BlockHeader) BlockAtTime(ts int64) (Block, bool)
- func (b *BlockHeader) BlockIndex(ts int64) (idx int, found bool)
- func (b *BlockHeader) Blocks() []BlockAtTime
- func (b *BlockHeader) BlocksAfter(ts int64) (blocks []BlockAtTime, ind int)
- func (b *BlockHeader) BlocksBefore(ts int64) []BlockAtTime
- func (b *BlockHeader) NBlocks() int
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
type BlockAtTime ¶
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