package rate

import "time"

type options struct {
	fillInterval time.Duration
	capacity     int64
	quantum      int64
	rate         float64
}

type Option func(o *options)

func WithFillInterval(fi time.Duration) Option {
	return func(o *options) {
		o.fillInterval = fi
	}
}

func WithCapacity(cap int64) Option {
	return func(o *options) {
		o.capacity = cap
	}
}

func WithQuantum(qt int64) Option {
	return func(o *options) {
		o.quantum = qt
	}
}

func WithRate(rate float64) Option {
	return func(o *options) {
		o.rate = rate
	}
}
