All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added support for Go modules (issue #81)
- All
gokv.Store
implementations are now separate Go modules
- All
- Added
gokv.Store
implementations: - Fixed: Compile error in
badgerdb
after a breaking change in BadgerDB 1.6.0
- Added: Package
encoding
- An abstraction and wrapper for the core functionality of packages likeencoding/json
andencoding/gob
(issue #47) - Added: Package
sql
- It contains shared code for SQL implementations.mysql
andpostgres
already use it and if you want to create your own SQL implementation you can use it as well. (Useful for issue #57.) - Added
gokv.Store
implementations:- Package
s3
- Agokv.Store
implementation for Amazon S3 (issue #37)- Also works for other S3-compatible cloud services like DigitalOcean Spaces and Scaleway Object Storage, as well as for self-hosted solutions like OpenStack Swift, Ceph and Minio
- Package
tablestorage
- Agokv.Store
implementation for Azure Table Storage (issue #42) - Package
datastore
- Agokv.Store
implementation for Google Cloud Datastore (issue #51) - Package
tablestore
- Agokv.Store
implementation for Alibaba Cloud Table Store (issue #70) - Package
leveldb
- Agokv.Store
implementation for LevelDB (issue #48) - Package
file
- Agokv.Store
implementation for storing key-value pairs as files (issue #52) - Package
zookeeper
- Agokv.Store
implementation for Apache ZooKeeper (issue #66) - Package
postgresql
- Agokv.Store
implementation for PostgreSQL (issue #57) - Package
cockroachdb
- Agokv.Store
implementation for CockroachDB (issue #62) - Package
ignite
- Agokv.Store
implementation for Apache Ignite (issue #64) - Package
freecache
- Agokv.Store
implementation for FreeCache (issue #44) - Package
bigcache
- Agokv.Store
implementation for BigCache (issue #45)
- Package
- The
MarshalFormat
enums were removed from all packages that containedgokv.Store
implementations. Instead the shared packageencoding
was introduced (required for issue #47)
- Added: Method
Close() error
(issue #36) - Added
gokv.Store
implementations: - Added: The factory function
redis.NewClient()
now checks if the connection to the Redis server works and otherwise returns an error. - Added: The
test
package now has the functionfunc TestConcurrentInteractions(t *testing.T, goroutineCount int, store gokv.Store)
that you can use to test yourgokv.Store
implementation with concurrent interactions. - Improved: The
etcd.Client
timeout implementation was improved. - Fixed: The
Get()
method of thebbolt
store ignored errors if they occurred during the retrieval of the value - Fixed: Spelling in error message when using the etcd implementation and the etcd server is unreachable
- The added
Close() error
method (see above) means that previous implementations ofgokv.Store
are not compatible with the interface anymore. - Renamed
bolt
package tobbolt
to reflect the fact that the maintained fork is used. Also changed all other occurrences of "bolt" (e.g. in GoDoc comments etc.). - Due to the above mentioned addition to the Redis client factory function, the function signature changed from
func NewClient(options Options) Client
tofunc NewClient(options Options) (Client, error)
.
- Added: Method
Delete(string) error
(issue #8) - Added: All
gokv.Store
implementations in this package now also support gob as marshal format as alternative to JSON (issue #22)- Part of this addition are a new field in the existing
Options
structs, calledMarshalFormat
, as well as the relatedMarshalFormat
enum (custom type + relatedconst
values) in each implementation package
- Part of this addition are a new field in the existing
- Added
gokv.Store
implementations:
- The added
Delete(string) error
method (see above) means that previous implementations ofgokv.Store
are not compatible with the interface anymore. - Changed: The
NewStore()
function ingomap
andsyncmap
now has anOption
parameter. Required for issue #22. - Changed: Passing an empty string as key to
Set()
,Get()
orDelete()
now results in an error - Changed: Passing
nil
as value parameter toSet()
or as pointer toGet()
now results in an error. This change leads to a consistent behaviour across the different marshal formats (otherwise for exampleencoding/json
marshalsnil
tonull
whileencoding/gob
returns an error).
- Added
gokv.Store
implementation:- Package
gomap
- Agokv.Store
implementation for a plain Go map with async.RWMutex
for concurrent access (issue #11)
- Package
- Improved: Every
gokv.Store
implementation resides in its own package now, so when downloading the package of an implementation, for example withgo get github.com/philippgille/gokv/redis
, only the actually required dependencies are downloaded and compiled, making the process much faster. This is especially useful for example when creating Docker images, where in many cases (depending on theDockerfile
) the download and compilation are repeated for each build. (Issue #2) - Improved: The performance of
bolt.Store
should be higher, because unnecessary manual locking was removed. (Issue #1) - Fixed: The
gokv.Store
implementation for bbolt / Bolt DB used data from within a Bolt transaction outside of it, without copying the value, which can lead to errors (see here) (issue #13)
- All
gokv.Store
implementations were moved into their own packages and the structs that implement the interface were renamed to avoid unidiomatic "stuttering".
Initial release with code from philippgille/ln-paywall:78fd1dfbf10f549a22f4f30ac7f68c2a2735e989 with only a few changes like a different default path and a bucket name as additional option for the Bolt DB implementation.
Features: