Versions in this module Expand all Collapse all v1 v1.6.0 Jul 29, 2026 v1.5.2 Mar 19, 2026 Changes in this version + type Consumer interface + Close func() + Consume func(s *Sample, custom interface{}) + type Producer interface + Produce func(ctx context.Context, sampleID uint64) (interface{}, error) + type ProducerConsumer interface + type ProducerFunc func(context.Context, uint64) (customData interface{}, err error) + func (f ProducerFunc) Produce(ctx context.Context, sampleID uint64) (interface{}, error) + type Runner interface + Run func(stop context.Context) (done context.Context) + func NewWithProducerConsumer(interval time.Duration, pc ProducerConsumer) Runner + type Sample struct + Err error + FinishedAt time.Time + ID uint64 + StartedAt time.Time + func (s Sample) String() string + type SortedByID []*Sample + func (s SortedByID) Len() int + func (s SortedByID) Less(i, j int) bool + func (s SortedByID) Swap(i, j int) + type SortedByStartedAt []*Sample + func (s SortedByStartedAt) Len() int + func (s SortedByStartedAt) Less(i, j int) bool + func (s SortedByStartedAt) Swap(i, j int)