WithClock configures the clock to use for time related operations. Mainly used for unit testing.
(clock clock.WithTicker)
| 56 | |
| 57 | // WithClock configures the clock to use for time related operations. Mainly used for unit testing. |
| 58 | func WithClock(clock clock.WithTicker) Option { |
| 59 | return func(mo *Options) { |
| 60 | mo.clock = clock |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // WithCreateBatchesFunc configures how cache items should be batched for refresh. Defaults to single item batching. |
| 65 | func WithCreateBatchesFunc(createBatchesCb CreateBatchesFunc) Option { |
no outgoing calls