Documentation
¶
Index ¶
- Variables
- type CompactableSync
- type Compactor
- type CompactorType
- type Option
- func WithC1ZOptions(opts ...dotc1z.C1ZOption) Option
- func WithCompactorType(compactorType CompactorType) Optiondeprecated
- func WithEngine(engine dotc1z.Engine) Option
- func WithRunDuration(runDuration time.Duration) Option
- func WithSkipGrantExpansion() Option
- func WithSyncLimit(limit int) Option
- func WithTmpDir(tempDir string) Option
Constants ¶
This section is empty.
Variables ¶
var ErrNotEnoughFilesToCompact = errors.New("must provide two or more files to compact")
Functions ¶
This section is empty.
Types ¶
type CompactableSync ¶
type Compactor ¶
type Compactor struct {
// contains filtered or unexported fields
}
func NewCompactor ¶
type CompactorType ¶ added in v0.3.36
type CompactorType string
const (
CompactorTypeAttached CompactorType = "attached"
)
type Option ¶ added in v0.3.5
type Option func(*Compactor)
func WithC1ZOptions ¶ added in v0.7.22
WithC1ZOptions sets the C1Z options to use for the compactor. This allows tweaking C1Z opts such as encoder/decoder parallelism.
func WithCompactorType
deprecated
added in
v0.3.36
func WithCompactorType(compactorType CompactorType) Option
Deprecated: There is now only one compactor type, so this option is no longer needed.
func WithEngine ¶ added in v0.12.5
WithEngine selects the storage engine for the compacted output. The default (unset) is sqlite, which is byte-identical to the historical compactor. EnginePebble produces a v3 Pebble c1z via a native record merge.
Selecting EnginePebble requires the Pebble engine driver to be registered with dotc1z; the compactor registers it on demand, but a caller may also register it explicitly via pkg/dotc1z/engine/pebble.Register before constructing the compactor.
This is the only supported way to choose the engine; an engine passed through WithC1ZOptions does not select the compaction strategy and is overridden.
func WithRunDuration ¶ added in v0.5.13
func WithSkipGrantExpansion ¶ added in v0.8.2
func WithSkipGrantExpansion() Option
WithSkipGrantExpansion skips grant expansion after compaction. This is useful when expansion will be handled separately (e.g. by incremental expansion).
func WithSyncLimit ¶ added in v0.7.0
WithSyncLimit sets the number of syncs to keep after compaction cleanup.
func WithTmpDir ¶ added in v0.3.5
WithTmpDir sets the working directory where files will be created and edited during compaction. If not provided, the temporary directory will be used.