blockfile

package
v0.0.0-...-5c01a83 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package blockfile provides methods for reading packets from blockfiles generated by stenotype.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockFile

type BlockFile struct {
	// contains filtered or unexported fields
}

BlockFile provides an interface to a single stenotype file on disk and its associated index.

func NewBlockFile

func NewBlockFile(filename string) (*BlockFile, error)

NewBlockFile opens up a named block file (and its index), returning a handle which can be used to look up packets.

func (*BlockFile) AllPackets

func (b *BlockFile) AllPackets() *base.PacketChan

AllPackets returns a packet channel to which all packets in the blockfile are sent.

func (*BlockFile) Close

func (b *BlockFile) Close() (err error)

Close cleans up this blockfile.

func (*BlockFile) DumpIndex

func (b *BlockFile) DumpIndex(out io.Writer, start, finish []byte)

DumpIndex dumps out a "human-readable" debug version of the blockfile's index to the given writer.

func (*BlockFile) Lookup

func (b *BlockFile) Lookup(ctx context.Context, q query.Query, out *base.PacketChan)

Lookup returns all packets in the blockfile matched by the passed-in query.

func (*BlockFile) Name

func (b *BlockFile) Name() string

Name returns the name of the file underlying this blockfile.

func (*BlockFile) Positions

func (b *BlockFile) Positions(ctx context.Context, q query.Query) (base.Positions, error)

Positions returns the positions in the blockfile of all packets matched by the passed-in query.

Jump to

Keyboard shortcuts

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