Browse Source

Rename all Go module paths

pull/223/head
James Mills 4 months ago
parent
commit
90dd53c573
Signed by: prologic GPG Key ID: AC4C014F1440EBD6
  1. 2
      .chglog/config.yml
  2. 4
      .goreleaser.yml
  3. 128
      CHANGELOG.md
  4. 44
      README.md
  5. 16
      bitcask.go
  6. 6
      bitcask_test.go
  7. 2
      cmd/bitcask/del.go
  8. 2
      cmd/bitcask/export.go
  9. 2
      cmd/bitcask/get.go
  10. 2
      cmd/bitcask/import.go
  11. 2
      cmd/bitcask/initdb.go
  12. 2
      cmd/bitcask/keys.go
  13. 2
      cmd/bitcask/merge.go
  14. 2
      cmd/bitcask/put.go
  15. 10
      cmd/bitcask/recover.go
  16. 2
      cmd/bitcask/root.go
  17. 2
      cmd/bitcask/scan.go
  18. 2
      cmd/bitcask/stats.go
  19. 2
      cmd/bitcaskd/main.go
  20. 2
      cmd/bitcaskd/server.go
  21. 2
      internal/data/codec/decoder.go
  22. 2
      internal/data/codec/decoder_test.go
  23. 2
      internal/data/codec/encoder.go
  24. 2
      internal/data/codec/encoder_test.go
  25. 4
      internal/data/datafile.go
  26. 6
      internal/data/recover.go
  27. 2
      internal/index/codec_index.go
  28. 2
      internal/index/codec_index_test.go
  29. 2
      internal/index/index.go
  30. 2
      internal/index/ttl_index.go
  31. 2
      internal/metadata/metadata.go
  32. 2
      internal/mocks/datafile.go
  33. 2
      options.go
  34. 2
      scripts/migrations/v0_to_v1.go

2
.chglog/config.yml

@ -3,7 +3,7 @@ style: Github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/prologic/bitcask
repository_url: https://git.mills.io/prologic/bitcask
options:
commits:
filters:

4
.goreleaser.yml

@ -5,7 +5,7 @@ builds:
binary: bitcask
main: ./cmd/bitcask
flags: -tags "static_build"
ldflags: -w -X github.com/prologic/bitcask/internal.Version={{.Version}} -X github.com/prologic/bitcask/internal.Commit={{.Commit}}
ldflags: -w -X git.mills.io/prologic/bitcask/internal.Version={{.Version}} -X git.mills.io/prologic/bitcask/internal.Commit={{.Commit}}
env:
- CGO_ENABLED=0
-
@ -13,7 +13,7 @@ builds:
binary: bitcaskd
main: ./cmd/bitcaskd
flags: -tags "static_build"
ldflags: -w -X github.com/prologic/bitcask/internal.Version={{.Version}} -X github.com/prologic/bitcask/internal.Commit={{.Commit}}
ldflags: -w -X git.mills.io/prologic/bitcask/internal.Version={{.Version}} -X git.mills.io/prologic/bitcask/internal.Commit={{.Commit}}
env:
- CGO_ENABLED=0
signs:

128
CHANGELOG.md

@ -1,6 +1,6 @@
<a name="v0.3.10"></a>
## [v0.3.10](https://github.com/prologic/bitcask/compare/v0.3.9...v0.3.10) (2020-12-18)
## [v0.3.10](https://git.mills.io/prologic/bitcask/compare/v0.3.9...v0.3.10) (2020-12-18)
### Bug Fixes
@ -20,7 +20,7 @@
<a name="v0.3.9"></a>
## [v0.3.9](https://github.com/prologic/bitcask/compare/v0.3.8...v0.3.9) (2020-11-17)
## [v0.3.9](https://git.mills.io/prologic/bitcask/compare/v0.3.8...v0.3.9) (2020-11-17)
### Bug Fixes
@ -32,7 +32,7 @@
<a name="v0.3.8"></a>
## [v0.3.8](https://github.com/prologic/bitcask/compare/v0.3.7...v0.3.8) (2020-11-17)
## [v0.3.8](https://git.mills.io/prologic/bitcask/compare/v0.3.7...v0.3.8) (2020-11-17)
### Updates
@ -40,7 +40,7 @@
<a name="v0.3.7"></a>
## [v0.3.7](https://github.com/prologic/bitcask/compare/v0.3.6...v0.3.7) (2020-11-17)
## [v0.3.7](https://git.mills.io/prologic/bitcask/compare/v0.3.6...v0.3.7) (2020-11-17)
### Updates
@ -48,24 +48,24 @@
<a name="v0.3.6"></a>
## [v0.3.6](https://github.com/prologic/bitcask/compare/v0.3.5...v0.3.6) (2020-11-17)
## [v0.3.6](https://git.mills.io/prologic/bitcask/compare/v0.3.5...v0.3.6) (2020-11-17)
### Bug Fixes
* Fix typo in labeler ([#172](https://github.com/prologic/bitcask/issues/172))
* Fix typo in labeler ([#172](https://git.mills.io/prologic/bitcask/issues/172))
* Fix builds configuration for goreleaser
* Fix (again) goreleaser config
* Fix goreleaser config and improve release notes / changelog
* Fix recoverDatafile error covering ([#162](https://github.com/prologic/bitcask/issues/162))
* Fix loadIndex to be deterministic ([#115](https://github.com/prologic/bitcask/issues/115))
* Fix recoverDatafile error covering ([#162](https://git.mills.io/prologic/bitcask/issues/162))
* Fix loadIndex to be deterministic ([#115](https://git.mills.io/prologic/bitcask/issues/115))
### Features
* Add configuration options for FileMode ([#183](https://github.com/prologic/bitcask/issues/183))
* Add imports and log in example code ([#182](https://github.com/prologic/bitcask/issues/182))
* Add configuration options for FileMode ([#183](https://git.mills.io/prologic/bitcask/issues/183))
* Add imports and log in example code ([#182](https://git.mills.io/prologic/bitcask/issues/182))
* Add empty changelog
* Add DependaBot config
* Add DeleteAll function ([#116](https://github.com/prologic/bitcask/issues/116))
* Add DeleteAll function ([#116](https://git.mills.io/prologic/bitcask/issues/116))
### Updates
@ -73,12 +73,12 @@
* Update README.md
* Update CHANGELOG for v0.3.6
* Update CHANGELOG for v0.3.6
* Update deps ([#140](https://github.com/prologic/bitcask/issues/140))
* Update deps ([#140](https://git.mills.io/prologic/bitcask/issues/140))
* Update README.md
<a name="v0.3.5"></a>
## [v0.3.5](https://github.com/prologic/bitcask/compare/v0.3.4...v0.3.5) (2019-10-20)
## [v0.3.5](https://git.mills.io/prologic/bitcask/compare/v0.3.4...v0.3.5) (2019-10-20)
### Bug Fixes
@ -89,27 +89,27 @@
### Features
* Add *.db to ignore future accidental commits of a bitcask db to the repo
* Add unit test for opening bad database with corrupted/invalid datafiles ([#105](https://github.com/prologic/bitcask/issues/105))
* Add unit test for opening bad database with corrupted/invalid datafiles ([#105](https://git.mills.io/prologic/bitcask/issues/105))
### Updates
* Update Drone CI test pipeline
* Update README.md
* Update to Go 1.13 and update README with new benchmarks ([#89](https://github.com/prologic/bitcask/issues/89))
* Update to Go 1.13 and update README with new benchmarks ([#89](https://git.mills.io/prologic/bitcask/issues/89))
* Update README.md
<a name="v0.3.4"></a>
## [v0.3.4](https://github.com/prologic/bitcask/compare/v0.3.3...v0.3.4) (2019-09-02)
## [v0.3.4](https://git.mills.io/prologic/bitcask/compare/v0.3.3...v0.3.4) (2019-09-02)
<a name="v0.3.3"></a>
## [v0.3.3](https://github.com/prologic/bitcask/compare/v0.3.2...v0.3.3) (2019-09-02)
## [v0.3.3](https://git.mills.io/prologic/bitcask/compare/v0.3.2...v0.3.3) (2019-09-02)
### Bug Fixes
* Fix a bug wit the decoder passing the wrong value for the value's offset into the buffer ([#77](https://github.com/prologic/bitcask/issues/77))
* Fix typo ([#65](https://github.com/prologic/bitcask/issues/65))
* Fix a bug wit the decoder passing the wrong value for the value's offset into the buffer ([#77](https://git.mills.io/prologic/bitcask/issues/77))
* Fix typo ([#65](https://git.mills.io/prologic/bitcask/issues/65))
* Fix and cleanup some unnecessary internal sub-packages and duplication
### Updates
@ -121,7 +121,7 @@
<a name="v0.3.2"></a>
## [v0.3.2](https://github.com/prologic/bitcask/compare/v0.3.1...v0.3.2) (2019-08-08)
## [v0.3.2](https://git.mills.io/prologic/bitcask/compare/v0.3.1...v0.3.2) (2019-08-08)
### Updates
@ -131,7 +131,7 @@
<a name="v0.3.1"></a>
## [v0.3.1](https://github.com/prologic/bitcask/compare/v0.3.0...v0.3.1) (2019-08-05)
## [v0.3.1](https://git.mills.io/prologic/bitcask/compare/v0.3.0...v0.3.1) (2019-08-05)
### Updates
@ -141,7 +141,7 @@
<a name="v0.3.0"></a>
## [v0.3.0](https://github.com/prologic/bitcask/compare/v0.2.2...v0.3.0) (2019-07-29)
## [v0.3.0](https://git.mills.io/prologic/bitcask/compare/v0.2.2...v0.3.0) (2019-07-29)
### Updates
@ -150,29 +150,29 @@
<a name="v0.2.2"></a>
## [v0.2.2](https://github.com/prologic/bitcask/compare/v0.2.1...v0.2.2) (2019-07-27)
## [v0.2.2](https://git.mills.io/prologic/bitcask/compare/v0.2.1...v0.2.2) (2019-07-27)
<a name="v0.2.1"></a>
## [v0.2.1](https://github.com/prologic/bitcask/compare/v0.2.0...v0.2.1) (2019-07-25)
## [v0.2.1](https://git.mills.io/prologic/bitcask/compare/v0.2.0...v0.2.1) (2019-07-25)
<a name="v0.2.0"></a>
## [v0.2.0](https://github.com/prologic/bitcask/compare/v0.1.7...v0.2.0) (2019-07-25)
## [v0.2.0](https://git.mills.io/prologic/bitcask/compare/v0.1.7...v0.2.0) (2019-07-25)
### Bug Fixes
* Fix issue(db file Merge issue in windows env): ([#15](https://github.com/prologic/bitcask/issues/15))
* Fix issue(db file Merge issue in windows env): ([#15](https://git.mills.io/prologic/bitcask/issues/15))
<a name="v0.1.7"></a>
## [v0.1.7](https://github.com/prologic/bitcask/compare/v0.1.6...v0.1.7) (2019-07-19)
## [v0.1.7](https://git.mills.io/prologic/bitcask/compare/v0.1.6...v0.1.7) (2019-07-19)
### Bug Fixes
* Fix mismatched key casing. ([#12](https://github.com/prologic/bitcask/issues/12))
* Fix outdated README ([#11](https://github.com/prologic/bitcask/issues/11))
* Fix typos in bitcask.go docs ([#10](https://github.com/prologic/bitcask/issues/10))
* Fix mismatched key casing. ([#12](https://git.mills.io/prologic/bitcask/issues/12))
* Fix outdated README ([#11](https://git.mills.io/prologic/bitcask/issues/11))
* Fix typos in bitcask.go docs ([#10](https://git.mills.io/prologic/bitcask/issues/10))
### Updates
@ -181,16 +181,16 @@
<a name="v0.1.6"></a>
## [v0.1.6](https://github.com/prologic/bitcask/compare/v0.1.5...v0.1.6) (2019-04-01)
## [v0.1.6](https://git.mills.io/prologic/bitcask/compare/v0.1.5...v0.1.6) (2019-04-01)
### Features
* Add Development section to README documenting use of Protobuf and tooling required. [#6](https://github.com/prologic/bitcask/issues/6)
* Add Development section to README documenting use of Protobuf and tooling required. [#6](https://git.mills.io/prologic/bitcask/issues/6)
* Add other badges from img.shields.io
<a name="v0.1.5"></a>
## [v0.1.5](https://github.com/prologic/bitcask/compare/v0.1.4...v0.1.5) (2019-03-30)
## [v0.1.5](https://git.mills.io/prologic/bitcask/compare/v0.1.4...v0.1.5) (2019-03-30)
### Documentation
@ -206,27 +206,27 @@
<a name="v0.1.4"></a>
## [v0.1.4](https://github.com/prologic/bitcask/compare/v0.1.3...v0.1.4) (2019-03-23)
## [v0.1.4](https://git.mills.io/prologic/bitcask/compare/v0.1.3...v0.1.4) (2019-03-23)
<a name="v0.1.3"></a>
## [v0.1.3](https://github.com/prologic/bitcask/compare/v0.1.2...v0.1.3) (2019-03-23)
## [v0.1.3](https://git.mills.io/prologic/bitcask/compare/v0.1.2...v0.1.3) (2019-03-23)
<a name="v0.1.2"></a>
## [v0.1.2](https://github.com/prologic/bitcask/compare/v0.1.1...v0.1.2) (2019-03-22)
## [v0.1.2](https://git.mills.io/prologic/bitcask/compare/v0.1.1...v0.1.2) (2019-03-22)
<a name="v0.1.1"></a>
## [v0.1.1](https://github.com/prologic/bitcask/compare/v0.1.0...v0.1.1) (2019-03-22)
## [v0.1.1](https://git.mills.io/prologic/bitcask/compare/v0.1.0...v0.1.1) (2019-03-22)
<a name="v0.1.0"></a>
## [v0.1.0](https://github.com/prologic/bitcask/compare/0.0.26...v0.1.0) (2019-03-22)
## [v0.1.0](https://git.mills.io/prologic/bitcask/compare/0.0.26...v0.1.0) (2019-03-22)
<a name="0.0.26"></a>
## [0.0.26](https://github.com/prologic/bitcask/compare/0.0.25...0.0.26) (2019-03-21)
## [0.0.26](https://git.mills.io/prologic/bitcask/compare/0.0.25...0.0.26) (2019-03-21)
### Features
@ -239,7 +239,7 @@
<a name="0.0.25"></a>
## [0.0.25](https://github.com/prologic/bitcask/compare/0.0.24...0.0.25) (2019-03-21)
## [0.0.25](https://git.mills.io/prologic/bitcask/compare/0.0.24...0.0.25) (2019-03-21)
### Features
@ -253,11 +253,11 @@
<a name="0.0.24"></a>
## [0.0.24](https://github.com/prologic/bitcask/compare/0.0.23...0.0.24) (2019-03-20)
## [0.0.24](https://git.mills.io/prologic/bitcask/compare/0.0.23...0.0.24) (2019-03-20)
<a name="0.0.23"></a>
## [0.0.23](https://github.com/prologic/bitcask/compare/0.0.22...0.0.23) (2019-03-20)
## [0.0.23](https://git.mills.io/prologic/bitcask/compare/0.0.22...0.0.23) (2019-03-20)
### Features
@ -265,27 +265,27 @@
<a name="0.0.22"></a>
## [0.0.22](https://github.com/prologic/bitcask/compare/0.0.21...0.0.22) (2019-03-18)
## [0.0.22](https://git.mills.io/prologic/bitcask/compare/0.0.21...0.0.22) (2019-03-18)
<a name="0.0.21"></a>
## [0.0.21](https://github.com/prologic/bitcask/compare/0.0.20...0.0.21) (2019-03-18)
## [0.0.21](https://git.mills.io/prologic/bitcask/compare/0.0.20...0.0.21) (2019-03-18)
<a name="0.0.20"></a>
## [0.0.20](https://github.com/prologic/bitcask/compare/0.0.19...0.0.20) (2019-03-17)
## [0.0.20](https://git.mills.io/prologic/bitcask/compare/0.0.19...0.0.20) (2019-03-17)
<a name="0.0.19"></a>
## [0.0.19](https://github.com/prologic/bitcask/compare/0.0.18...0.0.19) (2019-03-17)
## [0.0.19](https://git.mills.io/prologic/bitcask/compare/0.0.18...0.0.19) (2019-03-17)
<a name="0.0.18"></a>
## [0.0.18](https://github.com/prologic/bitcask/compare/0.0.17...0.0.18) (2019-03-16)
## [0.0.18](https://git.mills.io/prologic/bitcask/compare/0.0.17...0.0.18) (2019-03-16)
<a name="0.0.17"></a>
## [0.0.17](https://github.com/prologic/bitcask/compare/0.0.16...0.0.17) (2019-03-16)
## [0.0.17](https://git.mills.io/prologic/bitcask/compare/0.0.16...0.0.17) (2019-03-16)
### Features
@ -293,11 +293,11 @@
<a name="0.0.16"></a>
## [0.0.16](https://github.com/prologic/bitcask/compare/0.0.15...0.0.16) (2019-03-16)
## [0.0.16](https://git.mills.io/prologic/bitcask/compare/0.0.15...0.0.16) (2019-03-16)
<a name="0.0.15"></a>
## [0.0.15](https://github.com/prologic/bitcask/compare/0.0.14...0.0.15) (2019-03-16)
## [0.0.15](https://git.mills.io/prologic/bitcask/compare/0.0.14...0.0.15) (2019-03-16)
### Bug Fixes
@ -305,11 +305,11 @@
<a name="0.0.14"></a>
## [0.0.14](https://github.com/prologic/bitcask/compare/0.0.13...0.0.14) (2019-03-16)
## [0.0.14](https://git.mills.io/prologic/bitcask/compare/0.0.13...0.0.14) (2019-03-16)
<a name="0.0.13"></a>
## [0.0.13](https://github.com/prologic/bitcask/compare/0.0.12...0.0.13) (2019-03-16)
## [0.0.13](https://git.mills.io/prologic/bitcask/compare/0.0.12...0.0.13) (2019-03-16)
### Features
@ -317,11 +317,11 @@
<a name="0.0.12"></a>
## [0.0.12](https://github.com/prologic/bitcask/compare/0.0.11...0.0.12) (2019-03-14)
## [0.0.12](https://git.mills.io/prologic/bitcask/compare/0.0.11...0.0.12) (2019-03-14)
<a name="0.0.11"></a>
## [0.0.11](https://github.com/prologic/bitcask/compare/0.0.10...0.0.11) (2019-03-14)
## [0.0.11](https://git.mills.io/prologic/bitcask/compare/0.0.10...0.0.11) (2019-03-14)
### Updates
@ -329,7 +329,7 @@
<a name="0.0.10"></a>
## [0.0.10](https://github.com/prologic/bitcask/compare/0.0.9...0.0.10) (2019-03-14)
## [0.0.10](https://git.mills.io/prologic/bitcask/compare/0.0.9...0.0.10) (2019-03-14)
### Bug Fixes
@ -342,19 +342,19 @@
<a name="0.0.9"></a>
## [0.0.9](https://github.com/prologic/bitcask/compare/0.0.8...0.0.9) (2019-03-14)
## [0.0.9](https://git.mills.io/prologic/bitcask/compare/0.0.8...0.0.9) (2019-03-14)
<a name="0.0.8"></a>
## [0.0.8](https://github.com/prologic/bitcask/compare/0.0.7...0.0.8) (2019-03-13)
## [0.0.8](https://git.mills.io/prologic/bitcask/compare/0.0.7...0.0.8) (2019-03-13)
<a name="0.0.7"></a>
## [0.0.7](https://github.com/prologic/bitcask/compare/0.0.6...0.0.7) (2019-03-13)
## [0.0.7](https://git.mills.io/prologic/bitcask/compare/0.0.6...0.0.7) (2019-03-13)
<a name="0.0.6"></a>
## [0.0.6](https://github.com/prologic/bitcask/compare/0.0.5...0.0.6) (2019-03-13)
## [0.0.6](https://git.mills.io/prologic/bitcask/compare/0.0.5...0.0.6) (2019-03-13)
### Bug Fixes
@ -362,7 +362,7 @@
<a name="0.0.5"></a>
## [0.0.5](https://github.com/prologic/bitcask/compare/0.0.4...0.0.5) (2019-03-13)
## [0.0.5](https://git.mills.io/prologic/bitcask/compare/0.0.4...0.0.5) (2019-03-13)
### Features
@ -374,19 +374,19 @@
<a name="0.0.4"></a>
## [0.0.4](https://github.com/prologic/bitcask/compare/0.0.3...0.0.4) (2019-03-13)
## [0.0.4](https://git.mills.io/prologic/bitcask/compare/0.0.3...0.0.4) (2019-03-13)
### Features
* Add flock on database Open()/Close() to prevent multiple concurrent processes write access. Fixes [#2](https://github.com/prologic/bitcask/issues/2)
* Add flock on database Open()/Close() to prevent multiple concurrent processes write access. Fixes [#2](https://git.mills.io/prologic/bitcask/issues/2)
<a name="0.0.3"></a>
## [0.0.3](https://github.com/prologic/bitcask/compare/0.0.2...0.0.3) (2019-03-13)
## [0.0.3](https://git.mills.io/prologic/bitcask/compare/0.0.2...0.0.3) (2019-03-13)
<a name="0.0.2"></a>
## [0.0.2](https://github.com/prologic/bitcask/compare/0.0.1...0.0.2) (2019-03-13)
## [0.0.2](https://git.mills.io/prologic/bitcask/compare/0.0.1...0.0.2) (2019-03-13)
<a name="0.0.1"></a>

44
README.md

@ -1,25 +1,25 @@
# bitcask
![](https://github.com/prologic/bitcask/workflows/Coverage/badge.svg)
![](https://github.com/prologic/bitcask/workflows/Docker/badge.svg)
![](https://github.com/prologic/bitcask/workflows/Go/badge.svg)
![](https://github.com/prologic/bitcask/workflows/ReviewDog/badge.svg)
![](https://git.mills.io/prologic/bitcask/workflows/Coverage/badge.svg)
![](https://git.mills.io/prologic/bitcask/workflows/Docker/badge.svg)
![](https://git.mills.io/prologic/bitcask/workflows/Go/badge.svg)
![](https://git.mills.io/prologic/bitcask/workflows/ReviewDog/badge.svg)
[![CodeCov](https://codecov.io/gh/prologic/bitcask/branch/master/graph/badge.svg)](https://codecov.io/gh/prologic/bitcask)
[![Go Report Card](https://goreportcard.com/badge/prologic/bitcask)](https://goreportcard.com/report/prologic/bitcask)
[![codebeat badge](https://codebeat.co/badges/15fba8a5-3044-4f40-936f-9e0f5d5d1fd9)](https://codebeat.co/projects/github-com-prologic-bitcask-master)
[![GoDoc](https://godoc.org/github.com/prologic/bitcask?status.svg)](https://godoc.org/github.com/prologic/bitcask)
[![GitHub license](https://img.shields.io/github/license/prologic/bitcask.svg)](https://github.com/prologic/bitcask)
[![Sourcegraph](https://sourcegraph.com/github.com/prologic/bitcask/-/badge.svg)](https://sourcegraph.com/github.com/prologic/bitcask?badge)
[![TODOs](https://img.shields.io/endpoint?url=https://api.tickgit.com/badge?repo=github.com/prologic/bitcask)](https://www.tickgit.com/browse?repo=github.com/prologic/bitcask)
[![GoDoc](https://godoc.org/git.mills.io/prologic/bitcask?status.svg)](https://godoc.org/git.mills.io/prologic/bitcask)
[![GitHub license](https://img.shields.io/github/license/prologic/bitcask.svg)](https://git.mills.io/prologic/bitcask)
[![Sourcegraph](https://sourcegraph.com/git.mills.io/prologic/bitcask/-/badge.svg)](https://sourcegraph.com/git.mills.io/prologic/bitcask?badge)
[![TODOs](https://img.shields.io/endpoint?url=https://api.tickgit.com/badge?repo=git.mills.io/prologic/bitcask)](https://www.tickgit.com/browse?repo=git.mills.io/prologic/bitcask)
A high performance Key/Value store written in [Go](https://golang.org) with a predictable read/write performance and high throughput. Uses a [Bitcask](https://en.wikipedia.org/wiki/Bitcask) on-disk layout (LSM+WAL) similar to [Riak](https://riak.com/)
For a more feature-complete Redis-compatible server, distributed key/value store have a look at [Bitraft](https://github.com/prologic/bitraft) which uses this library as its backend. Use [Bitcask](https://github.com/prologic/bitcask) as a starting point or if you want to embed in your application, use [Bitraft](https://github.com/prologic/bitraft) if you need a complete server/client solution with high availability with a Redis-compatible API.
For a more feature-complete Redis-compatible server, distributed key/value store have a look at [Bitraft](https://git.mills.io/prologic/bitraft) which uses this library as its backend. Use [Bitcask](https://git.mills.io/prologic/bitcask) as a starting point or if you want to embed in your application, use [Bitraft](https://git.mills.io/prologic/bitraft) if you need a complete server/client solution with high availability with a Redis-compatible API.
## Features
* Embedded (`import "github.com/prologic/bitcask"`)
* Embedded (`import "git.mills.io/prologic/bitcask"`)
* Builtin CLI (`bitcask`)
* Builtin Redis-compatible server (`bitcaskd`)
* Predictable read/write performance
@ -41,7 +41,7 @@ __NOTE__: Please read this carefully to identify whether using Bitcask is
you can pass with `WithXXX()`.
- As the backing store to a distributed key/value store. See for example the
[bitraft](https://github.com/prologic/bitraft) as an example of this.
[bitraft](https://git.mills.io/prologic/bitraft) as an example of this.
- For high performance, low latency read/write workloads where you cannot fit
a typical hash-map into memory, but require the highest level of performance
@ -83,14 +83,14 @@ __NOTE__: Please read this carefully to identify whether using Bitcask is
## Development
```sh
$ git clone https://github.com/prologic/bitcask.git
$ git clone https://git.mills.io/prologic/bitcask.git
$ make
```
## Install
```sh
$ go get github.com/prologic/bitcask
$ go get git.mills.io/prologic/bitcask
```
## Usage (library)
@ -98,7 +98,7 @@ $ go get github.com/prologic/bitcask
Install the package into your project:
```sh
$ go get github.com/prologic/bitcask
$ go get git.mills.io/prologic/bitcask
```
```go
@ -106,7 +106,7 @@ package main
import (
"log"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
func main() {
@ -118,7 +118,7 @@ func main() {
}
```
See the [GoDoc](https://godoc.org/github.com/prologic/bitcask) for further
See the [GoDoc](https://godoc.org/git.mills.io/prologic/bitcask) for further
documentation and other examples.
## Usage (tool)
@ -179,7 +179,7 @@ $ make bench
...
goos: darwin
goarch: amd64
pkg: github.com/prologic/bitcask
pkg: git.mills.io/prologic/bitcask
BenchmarkGet/128B-4 316515 3263 ns/op 39.22 MB/s 160 B/op 1 allocs/op
BenchmarkGet/256B-4 382551 3204 ns/op 79.90 MB/s 288 B/op 1 allocs/op
@ -237,7 +237,7 @@ Support the ongoing development of Bitcask!
Thank you to all those that have contributed to this project, battle-tested it, used it in their own projects or products, fixed bugs, improved performance and even fix tiny typos in documentation! Thank you and keep contributing!
You can find an [AUTHORS](/AUTHORS) file where we keep a list of contributors to the project. If you contribute a PR please consider adding your name there. There is also GitHub's own [Contributors](https://github.com/prologic/bitcask/graphs/contributors) statistics.
You can find an [AUTHORS](/AUTHORS) file where we keep a list of contributors to the project. If you contribute a PR please consider adding your name there. There is also GitHub's own [Contributors](https://git.mills.io/prologic/bitcask/graphs/contributors) statistics.
[![](https://sourcerer.io/fame/prologic/prologic/bitcask/images/0)](https://sourcerer.io/fame/prologic/prologic/bitcask/links/0)
[![](https://sourcerer.io/fame/prologic/prologic/bitcask/images/1)](https://sourcerer.io/fame/prologic/prologic/bitcask/links/1)
@ -250,10 +250,10 @@ You can find an [AUTHORS](/AUTHORS) file where we keep a list of contributors to
## Related Projects
- [bitraft](https://github.com/prologic/bitraft) -- A Distributed Key/Value store (_using Raft_) with a Redis compatible protocol.
- [bitcaskfs](https://github.com/prologic/bitcaskfs) -- A FUSE file system for mounting a Bitcask database.
- [bitcask-bench](https://github.com/prologic/bitcask-bench) -- A benchmarking tool comparing Bitcask and several other Go key/value libraries.
- [bitraft](https://git.mills.io/prologic/bitraft) -- A Distributed Key/Value store (_using Raft_) with a Redis compatible protocol.
- [bitcaskfs](https://git.mills.io/prologic/bitcaskfs) -- A FUSE file system for mounting a Bitcask database.
- [bitcask-bench](https://git.mills.io/prologic/bitcask-bench) -- A benchmarking tool comparing Bitcask and several other Go key/value libraries.
## License
bitcask is licensed under the term of the [MIT License](https://github.com/prologic/bitcask/blob/master/LICENSE)
bitcask is licensed under the term of the [MIT License](https://git.mills.io/prologic/bitcask/blob/master/LICENSE)

16
bitcask.go

@ -14,14 +14,14 @@ import (
"time"
art "github.com/plar/go-adaptive-radix-tree"
"github.com/prologic/bitcask/flock"
"github.com/prologic/bitcask/internal"
"github.com/prologic/bitcask/internal/config"
"github.com/prologic/bitcask/internal/data"
"github.com/prologic/bitcask/internal/data/codec"
"github.com/prologic/bitcask/internal/index"
"github.com/prologic/bitcask/internal/metadata"
"github.com/prologic/bitcask/scripts/migrations"
"git.mills.io/prologic/bitcask/flock"
"git.mills.io/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal/config"
"git.mills.io/prologic/bitcask/internal/data"
"git.mills.io/prologic/bitcask/internal/data/codec"
"git.mills.io/prologic/bitcask/internal/index"
"git.mills.io/prologic/bitcask/internal/metadata"
"git.mills.io/prologic/bitcask/scripts/migrations"
log "github.com/sirupsen/logrus"
)

6
bitcask_test.go

@ -18,9 +18,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/prologic/bitcask/internal"
"github.com/prologic/bitcask/internal/config"
"github.com/prologic/bitcask/internal/mocks"
"git.mills.io/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal/config"
"git.mills.io/prologic/bitcask/internal/mocks"
)
var (

2
cmd/bitcask/del.go

@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var delCmd = &cobra.Command{

2
cmd/bitcask/export.go

@ -11,7 +11,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var errNotAllDataWritten = errors.New("error: not all data written")

2
cmd/bitcask/get.go

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var getCmd = &cobra.Command{

2
cmd/bitcask/import.go

@ -11,7 +11,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var importCmd = &cobra.Command{

2
cmd/bitcask/initdb.go

@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var initdbCmd = &cobra.Command{

2
cmd/bitcask/keys.go

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var keysCmd = &cobra.Command{

2
cmd/bitcask/merge.go

@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var mergeCmd = &cobra.Command{

2
cmd/bitcask/put.go

@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var putCmd = &cobra.Command{

10
cmd/bitcask/recover.go

@ -6,11 +6,11 @@ import (
"os"
"path/filepath"
"github.com/prologic/bitcask"
"github.com/prologic/bitcask/internal"
"github.com/prologic/bitcask/internal/config"
"github.com/prologic/bitcask/internal/data/codec"
"github.com/prologic/bitcask/internal/index"
"git.mills.io/prologic/bitcask"
"git.mills.io/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal/config"
"git.mills.io/prologic/bitcask/internal/data/codec"
"git.mills.io/prologic/bitcask/internal/index"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"

2
cmd/bitcask/root.go

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
// RootCmd represents the base command when called without any subcommands

2
cmd/bitcask/scan.go

@ -8,7 +8,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var scanCmd = &cobra.Command{

2
cmd/bitcask/stats.go

@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
var statsCmd = &cobra.Command{

2
cmd/bitcaskd/main.go

@ -7,7 +7,7 @@ import (
log "github.com/sirupsen/logrus"
flag "github.com/spf13/pflag"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
var (

2
cmd/bitcaskd/server.go

@ -12,7 +12,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/tidwall/redcon"
"github.com/prologic/bitcask"
"git.mills.io/prologic/bitcask"
)
type server struct {

2
internal/data/codec/decoder.go

@ -6,7 +6,7 @@ import (
"time"
"github.com/pkg/errors"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
var (

2
internal/data/codec/decoder_test.go

@ -7,7 +7,7 @@ import (
"testing"
"time"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
"github.com/stretchr/testify/assert"
)

2
internal/data/codec/encoder.go

@ -6,7 +6,7 @@ import (
"io"
"github.com/pkg/errors"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
const (

2
internal/data/codec/encoder_test.go

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
"github.com/stretchr/testify/assert"
)

4
internal/data/datafile.go

@ -7,8 +7,8 @@ import (
"sync"
"github.com/pkg/errors"
"github.com/prologic/bitcask/internal"
"github.com/prologic/bitcask/internal/data/codec"
"git.mills.io/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal/data/codec"
"golang.org/x/exp/mmap"
)

6
internal/data/recover.go

@ -6,9 +6,9 @@ import (
"os"
"path/filepath"
"github.com/prologic/bitcask/internal"
"github.com/prologic/bitcask/internal/config"
"github.com/prologic/bitcask/internal/data/codec"
"git.mills.io/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal/config"
"git.mills.io/prologic/bitcask/internal/data/codec"
)
// CheckAndRecover checks and recovers the last datafile.

2
internal/index/codec_index.go

@ -6,7 +6,7 @@ import (
"github.com/pkg/errors"
art "github.com/plar/go-adaptive-radix-tree"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
var (

2
internal/index/codec_index_test.go

@ -8,7 +8,7 @@ import (
"github.com/pkg/errors"
art "github.com/plar/go-adaptive-radix-tree"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
const (

2
internal/index/index.go

@ -4,7 +4,7 @@ import (
"os"
art "github.com/plar/go-adaptive-radix-tree"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
// Indexer is an interface for loading and saving the index (an Adaptive Radix Tree)

2
internal/index/ttl_index.go

@ -7,7 +7,7 @@ import (
"time"
art "github.com/plar/go-adaptive-radix-tree"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
type ttlIndexer struct{}

2
internal/metadata/metadata.go

@ -3,7 +3,7 @@ package metadata
import (
"os"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
type MetaData struct {

2
internal/mocks/datafile.go

@ -2,7 +2,7 @@
package mocks
import internal "github.com/prologic/bitcask/internal"
import internal "git.mills.io/prologic/bitcask/internal"
import mock "github.com/stretchr/testify/mock"
// Datafile is an autogenerated mock type for the Datafile type

2
options.go

@ -3,7 +3,7 @@ package bitcask
import (
"os"
"github.com/prologic/bitcask/internal/config"
"git.mills.io/prologic/bitcask/internal/config"
)
const (

2
scripts/migrations/v0_to_v1.go

@ -9,7 +9,7 @@ import (
"path"
"path/filepath"
"github.com/prologic/bitcask/internal"
"git.mills.io/prologic/bitcask/internal"
)
const (

Loading…
Cancel
Save