Revision compacts the log by purging revisions older than the configured reivison number. Compaction happens every 5 minutes.
| 30 | // Revision compacts the log by purging revisions older than |
| 31 | // the configured reivison number. Compaction happens every 5 minutes. |
| 32 | type Revision struct { |
| 33 | lg *zap.Logger |
| 34 | |
| 35 | clock clockwork.Clock |
| 36 | retention int64 |
| 37 | |
| 38 | rg RevGetter |
| 39 | c Compactable |
| 40 | |
| 41 | ctx context.Context |
| 42 | cancel context.CancelFunc |
| 43 | |
| 44 | mu sync.Mutex |
| 45 | paused bool |
| 46 | } |
| 47 | |
| 48 | // newRevision creates a new instance of Revisonal compactor that purges |
| 49 | // the log older than retention revisions from the current revision. |
nothing calls this directly
no outgoing calls
no test coverage detected