heavyserver

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sync

type Sync struct {
	ReplicaStorage storage.ReplicaStorage
	DBContext      storage.DBContext

	sync.Mutex
	// 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) Reset

func (s *Sync) Reset(ctx context.Context, jetID core.RecordID, pn core.PulseNumber) error

Reset resets sync for provided pulse.

func (*Sync) Start

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

Start try to start heavy sync for provided pulse.

func (*Sync) Stop

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

Stop successfully stops replication for specified pulse.

TODO: call Stop if range sync too long

func (*Sync) Store

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

Store stores recieved key/value pairs at heavy storage.

TODO: check actual jet and pulse in keys

Jump to

Keyboard shortcuts

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