func WithRelist()

in readers/apiserver/watchlist/internal/watchlist/watchlist.go [72:83]


func WithRelist(d time.Duration) Option {
	return func(c *Reader) error {
		if d < 1*time.Hour {
			return errors.New("relist duration must be at least 1 hour")
		}
		if d > 7*24*time.Hour {
			return errors.New("relist duration must be less than 7 days")
		}
		c.relist = d
		return nil
	}
}