Documentation
¶
Overview ¶
Package scheduler contains Sequencer-specific utilities for ensuring ordered access to rows.
Index ¶
- Variables
- type Scheduler
- func (s *Scheduler) Batch(batch *types.MultiBatch, fn func() error) *notify.Var[*lockset.Status]
- func (s *Scheduler) Singleton(table ident.Table, mut types.Mutation, fn func() error) *notify.Var[*lockset.Status]
- func (s *Scheduler) TableBatch(batch *types.TableBatch, fn func() error) *notify.Var[*lockset.Status]
- func (s *Scheduler) TemporalBatch(batch *types.TemporalBatch, fn func() error) *notify.Var[*lockset.Status]
Constants ¶
This section is empty.
Variables ¶
var Set = wire.NewSet(ProvideScheduler)
Set is used by Wire.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
A Scheduler is shared across Sequencer implementations to limit overall parallelism and to ensure ordered access to target rows.
func ProvideScheduler ¶
ProvideScheduler is called by Wire.
func (*Scheduler) Batch ¶
Batch executes the callback when it has clear access to apply all mutations in the given batch.
func (*Scheduler) Singleton ¶
func (s *Scheduler) Singleton( table ident.Table, mut types.Mutation, fn func() error, ) *notify.Var[*lockset.Status]
Singleton executes the callback executed when it has clear access to apply the mutation in the given table.
func (*Scheduler) TableBatch ¶
func (s *Scheduler) TableBatch( batch *types.TableBatch, fn func() error, ) *notify.Var[*lockset.Status]
TableBatch executes the callback executed when it has clear access to apply the mutation in the given batch.
func (*Scheduler) TemporalBatch ¶
func (s *Scheduler) TemporalBatch( batch *types.TemporalBatch, fn func() error, ) *notify.Var[*lockset.Status]
TemporalBatch executes the callback executed when it has clear access to apply the mutations in the given batch.