boltcompact

package module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2022 License: MIT Imports: 3 Imported by: 0

README

BoltCompact

compact bolt db to save storage usage

bolt client command "compact" to lib

Installing

go get github.com/TheScenery/boltcompact

How to use

import (
	"github.com/TheScenery/boltcompact"
)

func main() {
	boltcompact.Compact("src.db", "dst.db", nil)
}

A message from the author

If you are using the successor of bold db named bbolt. It's a more featureful version of Bolt, And has contains this feature in it's API. You will not need to use this lib. Just use like below:

 import bolt "go.etcd.io/bbolt"

 bolt.Compact("src.db", "dst.db", 65536)

Good Luck!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compact

func Compact(src, dst string, opt *CompactOption) error

Types

type CompactOption

type CompactOption struct {
	TxMaxSize int64 // Specifies the maximum size of individual transactions.Defaults to 64KB.
	Debug     bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL