recovery

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 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, isLegacyOrder bool) ([]*protocol.Publication, bool)

MergePublications allows to merge recovered pubs with buffered pubs collected during extracting recovered so result is ordered and with duplicates removed.

func PackUint64

func PackUint64(seq, gen uint32) uint64

PackUint64 ...

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