etcdserver/api/v3compactor/periodic.go
func newPeriodic(lg *zap.Logger, clock clockwork.Clock, h time.Duration, rg RevGetter, c Compactable) *Periodic {
	pc := &Periodic{
		lg:     lg,
		clock:  clock,
		period: h,
		rg:     rg,
		c:      c,
		revs:   make([]int64, 0),
	}
	pc.ctx, pc.cancel = context.WithCancel(context.Background())
	return pc
}
func newPeriodic(lg *zap.Logger, clock clockwork.Clock, h time.Duration, rg RevGetter, c Compactable) *Periodic {
	pc := &Periodic{
		lg:     lg,
		clock:  clock,
		period: h,
		rg:     rg,
		c:      c,
		revs:   make([]int64, 0),
	}
	pc.ctx, pc.cancel = context.WithCancel(context.Background())
	return pc
}
// newPeriodic creates a new instance of Periodic compactor that purges
// the log older than h Duration.