sync

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Unlicense Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sync manages background delta replication from peers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerState

type PeerState struct {
	Addr        string
	LastSeenSeq atomic.Uint64
	Priority    SyncPriority
}

type SyncPriority

type SyncPriority int

SyncPriority defines how often to check a peer for updates

const (
	PriorityHigh   SyncPriority = iota // Check every 100ms
	PriorityNormal                     // Check every 1s
	PriorityLow                        // Check every 10s
)

type SyncStore

type SyncStore interface {
	ApplyDelta(datasetName string, rec arrow.RecordBatch, seq uint64, ts int64) error
	MerkleRoot(name string) [32]byte
	GetMeshMembers() []mesh.Member
}

SyncStore defines the interface required by SyncWorker to interact with the local store. This breaks the circular dependency between mesh/sync and store packages.

type SyncWorker

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

SyncWorker manages background delta replication from peers

func NewSyncWorker

func NewSyncWorker(s SyncStore, logger *zerolog.Logger) *SyncWorker

func (*SyncWorker) AddPeer

func (w *SyncWorker) AddPeer(addr string)

func (*SyncWorker) Start

func (w *SyncWorker) Start()

func (*SyncWorker) Stop

func (w *SyncWorker) Stop()

Jump to

Keyboard shortcuts

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