breaksync

package
v4.87.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: MIT Imports: 2 Imported by: 2 modules, 2 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

Index

Constants

This section is empty.

Variables

View Source
var Identity = func(a string) []byte {
	return []byte(a)
}
View Source
var RuptureIdentity = func(a []byte) []byte {
	return a
}

Functions

This section is empty.

Types

type Rupture

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

func NewRupture

func NewRupture(name string, extract func([]byte) []byte) *Rupture

type Source

type Source[T any] struct {
	// contains filtered or unexported fields
}

func NewChanSource added in v4.39.0

func NewChanSource[T any](input <-chan T, keyer func(T) []byte, readRupture *Rupture) *Source[T]

func NewSliceSource added in v4.13.0

func NewSliceSource[T any](arr []T, keyer func(T) []byte, readRupture *Rupture) *Source[T]

func NewSource

func NewSource[T any](reader func() (T, error), keyer func(T) []byte, readRupture *Rupture) *Source[T]

func (*Source[T]) ComputeSynchro added in v4.39.0

func (s *Source[T]) ComputeSynchro(key []byte)

func (*Source[T]) Current

func (s *Source[T]) Current() any

func (*Source[T]) CurrentKey added in v4.39.0

func (s *Source[T]) CurrentKey() []byte

func (*Source[T]) IsSynchronized added in v4.39.0

func (s *Source[T]) IsSynchronized() bool

func (*Source[T]) NextKey added in v4.39.0

func (s *Source[T]) NextKey() []byte

func (*Source[T]) Read added in v4.39.0

func (s *Source[T]) Read() error

func (*Source[T]) ReadRupture added in v4.39.0

func (s *Source[T]) ReadRupture() *Rupture

type SyncSource added in v4.39.0

type SyncSource interface {
	ReadRupture() *Rupture
	Current() any
	CurrentKey() []byte
	NextKey() []byte
	IsSynchronized() bool
	ComputeSynchro([]byte)
	Read() error
}

type Synchronization

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

func NewSynchronization

func NewSynchronization() *Synchronization

func (*Synchronization) AddSources added in v4.13.0

func (s *Synchronization) AddSources(sources ...SyncSource) *Synchronization

func (*Synchronization) Run

func (s *Synchronization) Run(business func(uint, []any) error) (err error)

Jump to

Keyboard shortcuts

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