logstream

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SnapshotShardID = uint64(1)

Variables

View Source
var ErrNotInitialized = errors.New("not initialized")
View Source
var SnapshotLeaseTTL = 10 * time.Second

Functions

This section is empty.

Types

type ReplicationEvent

type ReplicationEvent[T core.ReplicableEvent[T]] struct {
	FromNodeId uint64
	Payload    T
}

func (*ReplicationEvent[T]) Marshal

func (e *ReplicationEvent[T]) Marshal() ([]byte, error)

func (*ReplicationEvent[T]) Unmarshal

func (e *ReplicationEvent[T]) Unmarshal(data []byte) error

type Replicator

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

func NewReplicator

func NewReplicator(
	snapshot snapshot.NatsSnapshot,
) (*Replicator, error)

func (*Replicator) ForceSaveSnapshot added in v0.8.4

func (r *Replicator) ForceSaveSnapshot()

func (*Replicator) LastSaveSnapshotTime added in v0.8.4

func (r *Replicator) LastSaveSnapshotTime() time.Time

func (*Replicator) Listen

func (r *Replicator) Listen(shardID uint64, callback func(payload []byte) error) error

func (*Replicator) Publish

func (r *Replicator) Publish(hash uint64, payload []byte) error

func (*Replicator) ReloadCertificates added in v0.8.5

func (r *Replicator) ReloadCertificates() error

func (*Replicator) RestoreSnapshot added in v0.6.0

func (r *Replicator) RestoreSnapshot() error

func (*Replicator) SaveSnapshot added in v0.6.0

func (r *Replicator) SaveSnapshot()

Jump to

Keyboard shortcuts

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