{"id":19331987,"url":"https://github.com/tikv/client-go","last_synced_at":"2025-04-14T02:57:11.250Z","repository":{"id":37735337,"uuid":"159907380","full_name":"tikv/client-go","owner":"tikv","description":"Go client for TiKV","archived":false,"fork":false,"pushed_at":"2025-04-02T12:26:59.000Z","size":5371,"stargazers_count":294,"open_issues_count":169,"forks_count":233,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-14T02:57:05.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tikv.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":"2018-12-01T04:03:34.000Z","updated_at":"2025-04-11T05:23:51.000Z","dependencies_parsed_at":"2023-10-25T03:32:19.466Z","dependency_job_id":"b03e7fcf-2b5e-4c63-b796-0c02de12b3c5","html_url":"https://github.com/tikv/client-go","commit_stats":{"total_commits":788,"total_committers":108,"mean_commits":7.296296296296297,"dds":0.8274111675126904,"last_synced_commit":"89643b0e8c9ee8cbd0fce4f264a8765c5665db17"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Fclient-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Fclient-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Fclient-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tikv%2Fclient-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tikv","download_url":"https://codeload.github.com/tikv/client-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813786,"owners_count":21165632,"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":[],"created_at":"2024-11-10T02:43:22.184Z","updated_at":"2025-04-14T02:57:11.219Z","avatar_url":"https://github.com/tikv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TiKV Go Client\n\nTiKV Go Client provides support for interacting with the [TiKV](https://github.com/tikv/tikv) server in the form of a Go library.\n\n![Stability Active](https://img.shields.io/badge/Stability-Active-yellow)\n[![Go Reference](https://pkg.go.dev/badge/github.com/tikv/client-go/v2.svg)](https://pkg.go.dev/github.com/tikv/client-go/v2)\n\n[![Unit Test](https://github.com/tikv/client-go/actions/workflows/test.yml/badge.svg)](https://github.com/tikv/client-go/actions/workflows/test.yml)\n[![Integration Test](https://github.com/tikv/client-go/actions/workflows/integration.yml/badge.svg)](https://github.com/tikv/client-go/actions/workflows/integration.yml)\n[![Compatibility Test](https://github.com/tikv/client-go/actions/workflows/compatibility.yml/badge.svg)](https://github.com/tikv/client-go/actions/workflows/compatibility.yml)\n\n## Package versions\n\nThere are 2 major versions of the `client-go` package.\n\n- `v2` is the latest stable version. This version was extracted from [pingcap/tidb](https://github.com/pingcap/tidb) and it includes new TiKV features like Follower Read, 1PC, Async Commit. The development of this version is on the `master` branch. The documentation for this version is below.\n\n- `v1` is the previous stable version and is only maintained for bug fixes. You can read the documentation [here](https://tikv.org/docs/4.0/reference/clients/go/).\n\n## Usage/Examples\n\n```bash\n  # valid versions be like @latest, @e5f932ae270887550b0cd221343dbd6b870b6c8f, @v2.0.0, @v2.0.1...\n  go get github.com/tikv/client-go/v2@COMMIT_HASH_OR_TAG_VERSION\n```\n\nExplanation of related concepts and sample code can be found in the [Client-Go Wiki](https://github.com/tikv/client-go/wiki). There are also executable examples in [examples directory](https://github.com/tikv/client-go/tree/master/examples).\n\n## Contributing to client-go\n\nPull Requests and issues are welcomed. Please check [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## Developing\n\n### Running Tests\n\nNote: All the following tests are included in the [CI](https://github.com/tikv/client-go/actions) and you can submit a Pull Request directly to hand over the work.\n\nTo run unit tests, use following command\n\n```bash\ngo test ./...\n```\n\nTo run code linter, make sure `golangci-lint` is [installed](https://golangci-lint.run/usage/install/#local-installation). Then use following command\n\n```bash\ngolangci-lint run\n```\n\n`integration_tests` can run against a real TiKV cluster. Here is an example:\n\n```bash\n./pd-server \u0026\nsleep 5\n./tikv-server \u0026\nsleep 10\ncd integration_tests\ngo test --with-tikv\n```\n\n### Test with TiDB\n\nIt is a common task to update client-go and then test it with TiDB.\n\nIf you only need to test locally, you can directly use the modified client-go on the same host by replacing:\n\n```bash\ngo mod edit -replace=github.com/tikv/client-go/v2=/path/to/client-go\n```\n\nIf you want to push your TiDB code to GitHub for running CI or for code review, you need to change the client-go used by TiDB to your developing branch using the following steps:\n\n```bash\ngo get -d github.com/GITHUB_USERNAME/client-go/v2@DEV_BRANCH\n# Output:\n# go get: github.com/GITHUB_USERNAME/client-go/v2@none updating to\n#         github.com/GITHUB_USERNAME/client-go/v2@v2.0.0-XXXXXXXXXXXXXX-XXXXXXXXXXXX: parsing go.mod:\n#         module declares its path as: github.com/tikv/client-go/v2\n#                 but was required as: github.com/GITHUB_USERNAME/client-go/v2\ngo mod edit -replace=github.com/tikv/client-go/v2=github.com/GITHUB_USERNAME/client-go/v2@v2.0.0-XXXXXXXXXXXXXX-XXXXXXXXXXXX\ngo mod download github.com/tikv/client-go/v2\n```\n\n## Used By\n\n`client-go` is used by the following projects:\n\n- [TiDB](https://github.com/pingcap/tidb): TiDB is an open source distributed HTAP database compatible with the MySQL protocol\n- [BR](https://github.com/pingcap/br): A command-line tool for distributed backup and restoration of the TiDB cluster data\n- [TiCDC](https://github.com/pingcap/ticdc): Change data capture for TiDB\n- [go-ycsb](https://github.com/pingcap/go-ycsb): A Go port of Yahoo! Cloud Serving Benchmark (YCSB)\n- [JuiceFS](https://github.com/juicedata/juicefs): JuiceFS is a distributed POSIX file system built on top of Redis and S3\n- [tcli](https://github.com/c4pt0r/tcli): A CLI tool for TiKV, for human being :)\n\n## License\n\n[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftikv%2Fclient-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftikv%2Fclient-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftikv%2Fclient-go/lists"}