// Compact will create a copy of the source DB and in the destination DB. This may // reclaim space that the source database no longer has use for. txMaxSize can be // used to limit the transactions size of this process and may trigger intermittent // commits. A value of zero will ignore transaction sizes. // TODO: merge with: https://github.com/etcd-io/etcd/blob/b7f0f52a16dbf83f18ca1d803f7892d750366a94/mvcc/backend/backend.go#L349 func Compact(dst, src *DB, txMaxSize int64) error { … } type walkFunc … // walk walks recursively the bolt database db, calling walkFn for each key it finds. func walk(db *DB, walkFn walkFunc) error { … } func walkBucket(b *Bucket, keypath [][]byte, k, v []byte, seq uint64, fn walkFunc) error { … }