recovery

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergePublications

func MergePublications(recoveredPubs []*protocol.Publication, bufferedPubs []*protocol.Publication) ([]*protocol.Publication, bool)

MergePublications ...

func NextSeqGen

func NextSeqGen(currentSeq, currentGen uint32) (uint32, uint32)

NextSeqGen ...

func Uint64Sequence

func Uint64Sequence(currentSeq, currentGen uint32) uint64

Uint64Sequence ...

func UnpackUint64

func UnpackUint64(val uint64) (uint32, uint32)

UnpackUint64 ...

Types

type PubSubSync

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

PubSubSync wraps logic to synchronize recovery with PUB/SUB.

func NewPubSubSync

func NewPubSubSync() *PubSubSync

NewPubSubSync creates new PubSubSyncer.

func (*PubSubSync) LockBuffer

func (c *PubSubSync) LockBuffer(channel string)

LockBuffer ...

func (*PubSubSync) ReadBuffered

func (c *PubSubSync) ReadBuffered(channel string) []*protocol.Publication

ReadBuffered ...

func (*PubSubSync) StartBuffering

func (c *PubSubSync) StartBuffering(channel string)

StartBuffering ...

func (*PubSubSync) StopBuffering

func (c *PubSubSync) StopBuffering(channel string)

StopBuffering ...

func (*PubSubSync) SyncPublication

func (c *PubSubSync) SyncPublication(channel string, pub *protocol.Publication, syncedFn func())

SyncPublication ...

Jump to

Keyboard shortcuts

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