(ctx context.Context)
| 35 | } |
| 36 | |
| 37 | func (c *checkpoint) wait(ctx context.Context) error { |
| 38 | select { |
| 39 | case <-ctx.Done(): |
| 40 | return ctx.Err() |
| 41 | case <-c.done: |
| 42 | return c.err |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func newCheckpoint(logger slog.Logger) *checkpoint { |
| 47 | return &checkpoint{ |