mirror of https://github.com/etcd-io/bbolt.git
*: update import paths "go.etcd.io/bbolt"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>pull/119/head
parent
82839da515
commit
76a4670663
2
Makefile
2
Makefile
|
@ -20,7 +20,7 @@ unused:
|
||||||
|
|
||||||
# go get github.com/kisielk/errcheck
|
# go get github.com/kisielk/errcheck
|
||||||
errcheck:
|
errcheck:
|
||||||
@errcheck -ignorepkg=bytes -ignore=os:Remove github.com/etcd-io/bbolt
|
@errcheck -ignorepkg=bytes -ignore=os:Remove go.etcd.io/bbolt
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -timeout 20m -v -coverprofile cover.out -covermode atomic
|
go test -timeout 20m -v -coverprofile cover.out -covermode atomic
|
||||||
|
|
|
@ -74,7 +74,7 @@ Shopify and Heroku use Bolt-backed services every day.
|
||||||
To start using Bolt, install Go and run `go get`:
|
To start using Bolt, install Go and run `go get`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ go get github.com/etcd-io/bbolt/...
|
$ go get go.etcd.io/bbolt/...
|
||||||
```
|
```
|
||||||
|
|
||||||
This will retrieve the library and install the `bolt` command line utility into
|
This will retrieve the library and install the `bolt` command line utility into
|
||||||
|
@ -94,7 +94,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
bolt "github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -537,7 +537,7 @@ this from a read-only transaction, it will perform a hot backup and not block
|
||||||
your other database reads and writes.
|
your other database reads and writes.
|
||||||
|
|
||||||
By default, it will use a regular file handle which will utilize the operating
|
By default, it will use a regular file handle which will utilize the operating
|
||||||
system's page cache. See the [`Tx`](https://godoc.org/github.com/etcd-io/bbolt#Tx)
|
system's page cache. See the [`Tx`](https://godoc.org/go.etcd.io/bbolt#Tx)
|
||||||
documentation for information about optimizing for larger-than-RAM datasets.
|
documentation for information about optimizing for larger-than-RAM datasets.
|
||||||
|
|
||||||
One common use case is to backup over HTTP so you can use tools like `cURL` to
|
One common use case is to backup over HTTP so you can use tools like `cURL` to
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0x7FFFFFFF // 2GB
|
const maxMapSize = 0x7FFFFFFF // 2GB
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import "unsafe"
|
import "unsafe"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build arm64
|
// +build arm64
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build mips64 mips64le
|
// +build mips64 mips64le
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0x8000000000 // 512GB
|
const maxMapSize = 0x8000000000 // 512GB
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build mips mipsle
|
// +build mips mipsle
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0x40000000 // 1GB
|
const maxMapSize = 0x40000000 // 1GB
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build ppc
|
// +build ppc
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0x7FFFFFFF // 2GB
|
const maxMapSize = 0x7FFFFFFF // 2GB
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build ppc64
|
// +build ppc64
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build ppc64le
|
// +build ppc64le
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build s390x
|
// +build s390x
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// maxMapSize represents the largest mmap size supported by Bolt.
|
// maxMapSize represents the largest mmap size supported by Bolt.
|
||||||
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build !windows,!plan9,!solaris
|
// +build !windows,!plan9,!solaris
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// +build !windows,!plan9,!linux,!openbsd
|
// +build !windows,!plan9,!linux,!openbsd
|
||||||
|
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
// fdatasync flushes written data to a file descriptor.
|
// fdatasync flushes written data to a file descriptor.
|
||||||
func fdatasync(db *DB) error {
|
func fdatasync(db *DB) error {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -13,7 +13,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"testing/quick"
|
"testing/quick"
|
||||||
|
|
||||||
"github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ensure that a bucket that gets a non-existent key returns nil.
|
// Ensure that a bucket that gets a non-existent key returns nil.
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
bolt "github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
|
@ -12,8 +12,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
"github.com/etcd-io/bbolt/cmd/bolt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ensure the "info" command can print information about a database.
|
// Ensure the "info" command can print information about a database.
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -11,7 +11,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"testing/quick"
|
"testing/quick"
|
||||||
|
|
||||||
"github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ensure that a cursor can return a reference to the bucket that created it.
|
// Ensure that a cursor can return a reference to the bucket that created it.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -18,7 +18,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
var statsFlag = flag.Bool("stats", false, "show performance stats")
|
var statsFlag = flag.Bool("stats", false, "show performance stats")
|
||||||
|
|
4
doc.go
4
doc.go
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Package bolt implements a low-level key/value store in pure Go. It supports
|
package bbolt implements a low-level key/value store in pure Go. It supports
|
||||||
fully serializable transactions, ACID semantics, and lock-free MVCC with
|
fully serializable transactions, ACID semantics, and lock-free MVCC with
|
||||||
multiple readers and a single writer. Bolt can be used for projects that
|
multiple readers and a single writer. Bolt can be used for projects that
|
||||||
want a simple data store without the need to add large dependencies such as
|
want a simple data store without the need to add large dependencies such as
|
||||||
|
@ -41,4 +41,4 @@ point to different data or can point to invalid memory which will cause a panic.
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt
|
package bbolt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package bolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimulateNoFreeListSync_1op_1p(t *testing.T) {
|
func TestSimulateNoFreeListSync_1op_1p(t *testing.T) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -7,7 +7,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, nil, 1, 1, 1) }
|
func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, nil, 1, 1, 1) }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package bolt_test
|
package bbolt_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
@ -8,7 +8,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/etcd-io/bbolt"
|
bolt "go.etcd.io/bbolt"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestTx_Check_ReadOnly tests consistency checking on a ReadOnly database.
|
// TestTx_Check_ReadOnly tests consistency checking on a ReadOnly database.
|
||||||
|
|
Loading…
Reference in New Issue