flusher

package
v1.1.0-alpha-8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flusher

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

Flusher defines a tlog flusher

func New

func New(confSource config.Source, dataShards, parityShards int, vdiskID, privKey string) (*Flusher, error)

New creates a new flusher

func (*Flusher) AddTransaction

func (f *Flusher) AddTransaction(op uint8, seq uint64, content []byte, index, timestamp int64) error

AddTransaction add transaction to this flusher and flush it if it reach FlushSize

func (*Flusher) Flush

func (f *Flusher) Flush() (int, error)

Flush flushes the transactions in buffer

Jump to

Keyboard shortcuts

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