{"id":13614653,"url":"https://github.com/kvtools/valkeyrie","last_synced_at":"2025-10-05T14:52:35.301Z","repository":{"id":44771309,"uuid":"110527916","full_name":"kvtools/valkeyrie","owner":"kvtools","description":"Distributed Key/Value Store Abstraction Library written in Go.","archived":false,"fork":false,"pushed_at":"2025-01-17T12:20:57.000Z","size":687,"stargazers_count":290,"open_issues_count":3,"forks_count":42,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-14T22:03:55.280Z","etag":null,"topics":["boltdb","consul","dynamodb","etcd","go","golang","key-value","kv-store","libkv","redis","zookeeper"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/kvtools/valkeyrie","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kvtools.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-13T09:32:49.000Z","updated_at":"2025-03-25T13:23:15.000Z","dependencies_parsed_at":"2022-09-09T05:20:54.375Z","dependency_job_id":"73237270-259e-4bff-ad81-0e72d964e11d","html_url":"https://github.com/kvtools/valkeyrie","commit_stats":{"total_commits":269,"total_committers":53,"mean_commits":"5.0754716981132075","dds":0.7026022304832713,"last_synced_commit":"6d6de7cf7ab33d09a7a17a9ece47213b6a807f32"},"previous_names":["abronan/valkeyrie"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvtools%2Fvalkeyrie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvtools%2Fvalkeyrie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvtools%2Fvalkeyrie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvtools%2Fvalkeyrie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kvtools","download_url":"https://codeload.github.com/kvtools/valkeyrie/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254044198,"owners_count":22005100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boltdb","consul","dynamodb","etcd","go","golang","key-value","kv-store","libkv","redis","zookeeper"],"created_at":"2024-08-01T20:01:04.152Z","updated_at":"2025-10-05T14:52:30.263Z","avatar_url":"https://github.com/kvtools.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"golangci-lint logo\" src=\"docs/valkeyrie.png\" height=\"350\" /\u003e\n  \u003ch3 align=\"center\"\u003eValkeyrie\u003c/h3\u003e\n  \u003cp align=\"center\"\u003eDistributed Key/Value Store Abstraction Library\u003c/p\u003e\n\u003c/p\u003e\n\n# Valkeyrie\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/kvtools/valkeyrie.svg)](https://pkg.go.dev/github.com/kvtools/valkeyrie)\n[![Build and test](https://github.com/kvtools/valkeyrie/actions/workflows/build.yml/badge.svg)](https://github.com/kvtools/valkeyrie/actions/workflows/build.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kvtools/valkeyrie)](https://goreportcard.com/report/github.com/kvtools/valkeyrie)\n\n`valkeyrie` provides a Go native library to store metadata using Distributed Key/Value stores (or common databases).\n\nIts goal is to abstract common store operations (`Get`, `Put`, `List`, etc.) for multiple Key/Value store backends.\n\nFor example, you can easily implement a generic *Leader Election* algorithm on top of it (see the [docker/leadership](https://github.com/docker/leadership) repository).\n\nThe benefit of `valkeyrie` is not to duplicate the code for programs that should support multiple distributed Key/Value stores such as `Consul`/`etcd`/`zookeeper`, etc.\n\n## Examples of Usage\n\nYou can refer to [Examples](https://github.com/kvtools/valkeyrie/blob/master/docs/examples.md) for a basic overview of the library.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/kvtools/consul\"\n\t\"github.com/kvtools/valkeyrie\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\t\n\tconfig := \u0026consul.Config{\n\t\tConnectionTimeout: 10 * time.Second,\n\t}\n\n\tkv, err := valkeyrie.NewStore(ctx, consul.StoreName, []string{\"localhost:8500\"}, config)\n\tif err != nil {\n\t\tlog.Fatal(\"Cannot create store consul\")\n\t}\n\n\tkey := \"foo\"\n\t\n\n\terr = kv.Put(ctx, key, []byte(\"bar\"), nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"Error trying to put value at key: %v\", key)\n\t}\n\n\tpair, err := kv.Get(ctx, key, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"Error trying accessing value at key: %v\", key)\n\t}\n\n\tlog.Printf(\"value: %s\", string(pair.Value))\n\n\terr = kv.Delete(ctx, key)\n\tif err != nil {\n\t\tlog.Fatalf(\"Error trying to delete key %v\", key)\n\t}\n}\n```\n\n## Compatibility\n\nA **storage backend** in `valkeyrie` implements (fully or partially) the [Store](https://github.com/kvtools/valkeyrie/blob/master/store/store.go#L69) interface.\n\n| Calls                 | Consul | Etcd | Zookeeper | Redis | BoltDB | DynamoDB |\n|-----------------------|:------:|:----:|:---------:|:-----:|:------:|:--------:|\n| Put                   |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n| Get                   |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n| Delete                |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n| Exists                |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n| Watch                 |  🟢️   | 🟢️  |    🟢️    |  🟢️  |   🔴   |    🔴    |\n| WatchTree             |  🟢️   | 🟢️  |    🟢️    |  🟢️  |   🔴   |    🔴    |\n| NewLock (Lock/Unlock) |  🟢️   | 🟢️  |    🟢️    |  🟢️  |   🔴   |   🟢️    |\n| List                  |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n| DeleteTree            |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n| AtomicPut             |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n| AtomicDelete          |  🟢️   | 🟢️  |    🟢️    |  🟢️  |  🟢️   |   🟢️    |\n\nThe store implementations:\n\n- [boltdb](https://github.com/kvtools/boltdb)\n- [consul](https://github.com/kvtools/consul)\n- [dynamodb](https://github.com/kvtools/dynamodb)\n- [etcdv2](https://github.com/kvtools/etcdv2)\n- [etcdv3](https://github.com/kvtools/etcdv3)\n- [redis](https://github.com/kvtools/redis)\n- [zookeeper](https://github.com/kvtools/zookeeper)\n\nThe store template:\n\n- [template](https://github.com/kvtools/template)\n\n## Limitations\n\nDistributed Key/Value stores often have different concepts for managing and formatting keys and their associated values.\nEven though `valkeyrie` tries to abstract those stores aiming for some consistency, in some cases it can't be applied easily.\n\nCalls like `WatchTree` may return different events (or number of events) depending on the backend\n(for now, `Etcd` and `Consul` will likely return more events than `Zookeeper` that you should triage properly).\n\n## Contributing\n\nWant to contribute to `valkeyrie`?\nTake a look at the [Contribution Guidelines](https://github.com/kvtools/valkeyrie/blob/master/CONTRIBUTING.md).\n\nThe [Maintainers](https://github.com/kvtools/valkeyrie/blob/master/maintainers.md).\n\n## Copyright and License\n\nApache License Version 2.0\n\nValkeyrie started as a hard fork of the unmaintained [libkv](https://github.com/docker/libkv).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvtools%2Fvalkeyrie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkvtools%2Fvalkeyrie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvtools%2Fvalkeyrie/lists"}