decoder

package
v1.1.0-alpha-4 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNilLastHash indicates that there is no last hash entry
	ErrNilLastHash = errors.New("nil last hash")
)

Functions

func GetLashHashKey

func GetLashHashKey(vdiskID string) []byte

GetLashHashKey returns last hash key of a given vdisk ID

Types

type DecodedAggregation

type DecodedAggregation struct {
	Agg *schema.TlogAggregation
	Err error
}

DecodedAggregation defines a decoded tlog aggregation from decoder.

type Decoder

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

Decoder defines tlog data decoder

func New

func New(pool tlog.RedisPool, k, m int, vdiskID, privKey, hexNonce string) (*Decoder, error)

New creates a tlog decoder

func (*Decoder) Decode

func (d *Decoder) Decode(startTs, endTs uint64) <-chan *DecodedAggregation

Decode decodes all tlog transaction started from startTs timestamp to endTs timestamp. If startTs == 0, it means from the beginning of transaction. If endTs == 0, it means until the end of transaction

func (*Decoder) GetLastHash

func (d *Decoder) GetLastHash() ([]byte, error)

GetLastHash returns valid last hash of a vdisk. It checks all data shards to get latest valid hash

Jump to

Keyboard shortcuts

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