generalize trigger kinds

This commit is contained in:
Christian Schwarz
2023-12-22 14:40:53 +00:00
parent b0caa2d151
commit c8afaf83ab
13 changed files with 168 additions and 57 deletions
+3 -3
View File
@@ -93,7 +93,7 @@ type activeMode interface {
SenderReceiver() (logic.Sender, logic.Receiver)
Type() Type
PlannerPolicy() logic.PlannerPolicy
RunPeriodic(ctx context.Context, wakeReplication *trigger.Trigger)
RunPeriodic(ctx context.Context, wakeReplication trigger.Trigger
SnapperReport() *snapper.Report
ResetConnectBackoff()
}
@@ -135,7 +135,7 @@ func (m *modePush) Type() Type { return TypePush }
func (m *modePush) PlannerPolicy() logic.PlannerPolicy { return *m.plannerPolicy }
func (m *modePush) RunPeriodic(ctx context.Context, trigger *trigger.Trigger) {
func (m *modePush) RunPeriodic(ctx context.Context, trigger trigger.Trigger {
m.snapper.Run(ctx, trigger)
}
@@ -224,7 +224,7 @@ func (*modePull) Type() Type { return TypePull }
func (m *modePull) PlannerPolicy() logic.PlannerPolicy { return *m.plannerPolicy }
func (m *modePull) RunPeriodic(ctx context.Context, wakeReplication *trigger.Trigger) {
func (m *modePull) RunPeriodic(ctx context.Context, wakeReplication trigger.Trigger {
if m.interval.Manual {
GetLogger(ctx).Info("manual pull configured, periodic pull disabled")
// "waiting for wakeups" is printed in common ActiveSide.do