Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Identity = func(a string) string {
return a
}
Identity consider key as rupture value
Functions ¶
This section is empty.
Types ¶
type Rupture ¶
type Rupture struct {
// contains filtered or unexported fields
}
Rupture in a break/sync algorithm
type Source ¶
type Source[T any] struct { // contains filtered or unexported fields }
Source of data in a break/sync algorithm
func NewChanSource ¶ added in v4.39.0
NewChanSource is a source from a chan, read sequentially
func NewSliceSource ¶ added in v4.13.0
NewSliceSource is a source from a slice, read sequentially
func NewSource ¶
func NewSource[T any](reader func() (T, error), keyer func(T) string, readRupture *Rupture) *Source[T]
NewSource creates and initialize Source
func (*Source[T]) ComputeSynchro ¶ added in v4.39.0
func (*Source[T]) CurrentKey ¶ added in v4.39.0
func (*Source[T]) IsSynchronized ¶ added in v4.39.0
func (*Source[T]) ReadRupture ¶ added in v4.39.0
type SyncSource ¶ added in v4.39.0
type SyncSource interface { ReadRupture() *Rupture Current() any CurrentKey() string NextKey() string IsSynchronized() bool ComputeSynchro(string) Read() error }
SyncSource behavior interface
type Synchronization ¶
type Synchronization struct {
// contains filtered or unexported fields
}
Synchronization in a break/sync algorithm
func NewSynchronization ¶
func NewSynchronization() *Synchronization
NewSynchronization creates and initializes Synchronization
func (*Synchronization) AddSources ¶ added in v4.13.0
func (s *Synchronization) AddSources(sources ...SyncSource) *Synchronization
AddSources adds given source
Click to show internal directories.
Click to hide internal directories.