b1

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package b1 reads data from b1 shards.

Index

Constants

View Source
const DefaultChunkSize int = 1000

DefaultChunkSize is the size of chunks read from the b1 shard

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader is used to read all data from a b1 shard.

func NewReader

func NewReader(path string, stats *stats.Stats, chunkSize int) *Reader

NewReader returns a reader for the b1 shard at path.

func (*Reader) Close

func (r *Reader) Close() error

Close closes the reader.

func (*Reader) Next

func (r *Reader) Next() bool

Next returns whether any data remains to be read. It must be called before the next call to Read().

func (*Reader) Open

func (r *Reader) Open() error

Open opens the reader.

func (*Reader) Read

func (r *Reader) Read() (string, []tsm1.Value, error)

Read returns the next chunk of data in the shard, converted to tsm1 values. Data is emitted completely for every field, in every series, before the next field is processed. Data from Read() adheres to the requirements for writing to tsm1 shards

Jump to

Keyboard shortcuts

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