Documentation
¶
Overview ¶
Package conveyor delivers mutations to target.
Index ¶
- Variables
- type Config
- type Conveyor
- func (c *Conveyor) AcceptMultiBatch(ctx context.Context, batch *types.MultiBatch, options *types.AcceptOptions) error
- func (c *Conveyor) Advance(ctx context.Context, partition ident.Ident, ts hlc.Time) error
- func (c *Conveyor) Ensure(ctx context.Context, partitions []ident.Ident) error
- func (c *Conveyor) Range() *notify.Var[hlc.Range]
- func (c *Conveyor) Refresh()
- func (c *Conveyor) Stat() *notify.Var[sequencer.Stat]
- func (c *Conveyor) TableGroup() *types.TableGroup
- func (c *Conveyor) Watcher() types.Watcher
- type Conveyors
Constants ¶
This section is empty.
Variables ¶
var Set = wire.NewSet(ProvideConveyors)
Set is used by Wire.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Switch between BestEffort mode and Core if the applied resolved // timestamp is older than this threshold. A negative or zero value // will disable BestEffort switching. BestEffortWindow time.Duration // Force the use of BestEffort mode. BestEffortOnly bool // Don't use a core changefeed for cross-Replicator notifications // and only use a polling strategy for detecting changes to the // timestamp bounds. DisableCheckpointStream bool // Write directly to staging tables. May limit compatibility with // schemas that contain foreign keys. Immediate bool // If non-zero, limit the number of checkpoint rows that will be // used to compute the resolving range. This will limit the maximum // amount of observable skew in the target due to blocked mutations // (e.g. running into a lock), but will cause replication to stall // if behind by this many checkpoints. LimitLookahead int }
Config defines the behavior for a Conveyor.
type Conveyor ¶
type Conveyor struct {
// contains filtered or unexported fields
}
A Conveyor delivers mutations to a target, possibly asynchronously. It provides an abstraction over various delivery strategies and it manages checkpoints across multiple partitions for a table group.
func (*Conveyor) AcceptMultiBatch ¶
func (c *Conveyor) AcceptMultiBatch( ctx context.Context, batch *types.MultiBatch, options *types.AcceptOptions, ) error
AcceptMultiBatch transmits the batch. The options may be nil.
func (*Conveyor) Refresh ¶
func (c *Conveyor) Refresh()
Refresh is used for testing to refresh the checkpoint.
func (*Conveyor) TableGroup ¶
func (c *Conveyor) TableGroup() *types.TableGroup
TableGroup returns the TableGroup associated to this conveyor.
type Conveyors ¶
type Conveyors struct {
// contains filtered or unexported fields
}
Conveyors manages the plumbing necessary to deliver mutations to a target schema across multiple partitions. It is also responsible for mode-switching.
func ProvideConveyors ¶
func ProvideConveyors( ctx *stopper.Context, acc *apply.Acceptor, cfg *Config, checkpoints *checkpoint.Checkpoints, retire *retire.Retire, sw *switcher.Switcher, watchers types.Watchers, ) (*Conveyors, error)
ProvideConveyors is called by Wire.