heavy

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package heavy contains methods for processing synchronization tasks on heavy node.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSyncInProgress = errors.New("Heavy node already syncing")
)

processable errors by client (i.e. it could retry)

Functions

This section is empty.

Types

type Sync

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

Sync provides methods for syncing records to heavy storage.

func NewSync

func NewSync(db *storage.DB) *Sync

NewSync creates new Sync instance.

func (*Sync) Start

func (s *Sync) Start(ctx context.Context, pn core.PulseNumber) error

Start try to start heavy sync for provided pulse.

func (*Sync) Stop

func (s *Sync) Stop(ctx context.Context, pn core.PulseNumber) error

Stop stops replication with specified pulses range.

TODO: call Stop if range sync too long

func (*Sync) Store

func (s *Sync) Store(ctx context.Context, pn core.PulseNumber, kvs []core.KV) error

Store stores recieved key/value pairs at heavy storage.

TODO: check actual pulse in keys

Jump to

Keyboard shortcuts

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