Documentation
¶
Overview ¶
Package sequtil contains sequencer utility methods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LeaseGroup ¶
func LeaseGroup( outer *stopper.Context, leases types.Leases, gracePeriod time.Duration, group *types.TableGroup, fn func(*stopper.Context, *types.TableGroup), )
LeaseGroup ensures that multiple sequencers do not operate on the same tables. This function will create a goroutine within the context that acquires a lease based on the group name. The callback will be executed as a goroutine within a suitably nested stopper.
Types ¶
type Copier ¶
type Copier struct { Config *sequencer.Config // Controls for flush behavior. Each EachFn // Optional callback to receive each batch. Flush FlushFn // Optional callback to receive aggregated data. Progress ProgressFn // Optional callback when the source has become idle. Source <-chan *types.StagingCursor // Input data. }
A Copier consumes a channel of types.StagingCursor, assembles the individual temporal batches into large batches, and invokes event callbacks to process the larger batches.
Click to show internal directories.
Click to hide internal directories.